Skip to content
Advertisement

How to open a php page which is out of /var/www/html in browsers?

There is an apache server with three directories in /var/www/:

/var/www/html/ and /var/www/printer and /var/www/codes

I can read all pages in /html/ via browser with no problem. But I don’t know how to read pages in /printer/ through a browser. The codes/ directory has a 0777 permission but there is nothing in it.

1- The question is how can a regular user read files in directories other than /var/www/html/ via browser?

2- Can users misuse the /codes/ directory to escalate their privilege? If yes how? FYI: users can make any file in codes but cannot change its ownership to root or anyone else.

Thanks.

UPDATE:

JavaScript

Advertisement

Answer

You should use a directive and an Alias:

JavaScript

If you are using httpd2.4 then use Require all granted instead of Order allow,deny Allow from all.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement