setting file permissions on a web server

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Sun Apr 30 05:40:52 EDT 2006


John Salerno:
>I always read about how you need to set certain file permissions (for 
>cgi files, for example), but it's never been clear to me *how* you do 
>this. I know you can run the line
>
>chmod 755 scriptname.py
>
>but *where* do you run this? 

This is a Unix/Linux command. You run it in a shell login on the server
(e.g. in Putty, SecureCRT, or some other ssh client you're using).

>Is there a way to put the above line within the script perhaps, so that 
>the script sets its permission automatically?

Not in the script itself via cgi of course, because it needs certain
permissions before it can be run as cgi script. But you could put the
command in an installation script that installs the cgi script.

-- 
René Pijlman



More information about the Python-list mailing list