Public link - Forbidden


#1

Hi guys,

When I try to generate a public link, I always get:

403 Forbidden
You don’t have permission to access /pydio_public/97dc92 on this server.

It is a fresh installation of Pydio and it’s running on Centos 7.

Can you help me? Thank you


#2

Hi,

Please check:

  • apache module: rewrite => should be enabled
  • post your .htaccess in root folder of Pydio

#3

Hi there, thanks for the quick answer.

So I checked mod rewrite and it is enabled.

I post my .htaccess in Pydio’s root folder. This is what I have inside it:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

TBH I never configured a .htaccess file before, so i might be setting up something wrong.


#4

it’s default .htaccess:


#5

Where .htaccess supposed to be?
at /var/var/lib/pydio
or
at /var/lib/pydio/public
?

I find out that I have .htaccess inside those 2 folders and this is the content of one of ones:
Order Deny,Allow

Allow from all

Require all granted

<Files “.ajxp_*”>

deny from all

</Files>

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteBase /pydio_public

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([.a-zA-Z0-9_-]+).php$ share.php?hash=$1 [QSA]

RewriteRule ^([.a-zA-Z0-9_-]+)–([a-z]+)$ share.php?hash=$1&lang=$2 [QSA]

RewriteRule ^([.a-zA-Z0-9_-]+)$ share.php?hash=$1 [QSA]

</IfModule>


#6

Hi,

What’s version of Pydio?
I mean /usr/share/pydio/.htaccess


#7

Pydio 8.

here`s what i have inside /usr/share/pydio/.htaccess

<IfModule mod_rewrite.c>

You must set the correct values here if you want

to enable webDAV sharing. The values assume that your

and that you want the webDAV shares to be accessible

RewriteEngine on

RewriteBase /pydio

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^shares ./dav.php [L]

RewriteRule ^api ./rest.php [L]

RewriteRule ^user ./index.php?get_action=user_access_point [L]

RewriteCond %{REQUEST_URI} !^/pydio/index

RewriteCond %{REQUEST_URI} !^/pydio/plugins

RewriteCond %{REQUEST_URI} ^/pydio/dashboard|^/pydio/welcome|^/pydio/settings|^/pydio/ws-

RewriteRule (.*) index.php [L]

#Following lines seem to be necessary if PHP is working

#with apache as CGI or FCGI. Just remove the #

#See http://doc.tiki.org/WebDAV#Note_about_Apache_with_PHP_as_fcgi_or_cgi

#RewriteCond %{HTTP:Authorization} ^(.*)

#RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

#Following lines may be necessary for a PHP-FPM setup

to make sure that authorization is transmitted.

Just remove the # at the beginning of the line

#SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

</IfModule>

AddType application/json .json


#8

Pydio 8

here`s what i have inside /usr/share/pydio/.htaccess

RewriteBase /pydio

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^shares ./dav.php [L]

RewriteRule ^api ./rest.php [L]

RewriteRule ^user ./index.php?get_action=user_access_point [L]

RewriteCond %{REQUEST_URI} !^/pydio/index

RewriteCond %{REQUEST_URI} !^/pydio/plugins

RewriteCond %{REQUEST_URI} ^/pydio/dashboard|^/pydio/welcome|^/pydio/settings|^/pydio/ws-

RewriteRule (.*) index.php [L]

#Following lines seem to be necessary if PHP is working

#with apache as CGI or FCGI. Just remove the #

#See http://doc.tiki.org/WebDAV#Note_about_Apache_with_PHP_as_fcgi_or_cgi

#RewriteCond %{HTTP:Authorization} ^(.*)

#RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

#Following lines may be necessary for a PHP-FPM setup

#SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

</IfModule>

AddType application/json .json


#9

in the url of pydio of home page, do you have /pydio or without /pydio ?

If your domain is link : http://domain/ => remove /pydio in .htaccess
otherwise, add /pydio/pydio_public in Pydio >> settigns > main options >> public link :


#10

My url is witjout /pydio.

i removed, but nothing changed. When I added the “Allow from all”, I started to get a different error.

Now I`m getting: “Internal Server Error”

I have this inside my error`s log:

/var/lib/pydio/public/.htaccess: Require not allowed here

Any thoughts?


#11

Here is the solution:

you have to edit /etc/httpd/conf/httpd.conf and add:

<Directory “/var/lib/pydio/public/”>
AllowOverride AuthConfig
Require all granted
< /Directory>

And that`s it.