Including a remote file -- permission denied?

Aaron Scott aaron.hildebrandt at gmail.com
Fri May 14 15:27:02 EDT 2010


I have a Python script running on the default OSX webserver, stored
in /Library/WebServer/CGI-Executables. That script spits out a list of
files on a network drive, a la "os.listdir('/Volumes/code/
directory/')". If I just execute this from the terminal, it works as
expected, but when I try to access it through a browser
(computer.local/cgi-bin/test.py), I get a permissions error (<type
'exceptions.OSError'>: [Errno 13] Permission denied: '/Volumes/code/
directory').

Is there any way to give the script permission to access the network
when accessed via CGI?



More information about the Python-list mailing list