How do I access file/scripts stored in a subfolder of my root folder from something in a site directory (e.g. access /python/test.py
from public_html/site1/cgi-bin/example.py
)?
Asked
Active
Viewed 202 times
0

Freesnöw
- 30,619
- 30
- 89
- 138
-
You should be able to access it as `/python/test.py` assuming you've set the permissions for that path such that your webserver can access it, unless your webserver has called [`chroot(2)`](http://linux.die.net/man/2/chroot), in which case you can't. – Aya May 18 '13 at 14:32
-
@Aya `/` returns me the root path of the site (e.g. `public_html/site1`). – Freesnöw May 18 '13 at 14:39
-
Sounds like your webserver is `chroot`ed then, so you won't be access anything outside `public_html/site1`. If it's your webserver, you can reconfigure it to not do the `chroot`, but if you don't have administrative access, you'll have to ensure all the files you want to access are inside `public_html/site1`. – Aya May 18 '13 at 14:55