setting file permissions on a web server

Edward Elliott nobody at 127.0.0.1
Sun Apr 30 17:01:31 EDT 2006


Daniel Nogradi wrote:
> I have next to zero experience with windows but as far as I know
> windows doesn't have file permissions at all (anyone, please correct
> me if I'm wrong :)) so in windows land it doesn't make any sense to
> "change file permissions". 

Actually Windows has a quite good permission scheme, with full owner/group
ACLs and granular permissions for read, write, append, delete, and several
others I can't recall.  The problem is no one uses them much.  The
manipulation tools are a pain, and developers routinely ignore them
(including Microsoft's own developers, although I hear they've gotten much
better lately).

> I guess so. But that's not a terribly big problem even if you can't
> use ssh. What I would do is write a script (in python of course :))
> that does the file permission changing and run that script over the
> web. Since this can have serious security implications my strategy 
> would be to place this script somewhere which is not reachable through
> the web and only relocate it to a web accessible directory when you
> want to run it over the web, and when you are done, you place it back
> to its secure location so nobody can reach it. 

You're right about the security concerns, but your solution sounds like more
trouble than it's worth.  With a bit more effort, you could write a local
python script that acts as an ftp client and applies permissions remotely. 
But why bother when a good ftp client already has that built-in (and is
much less likely to contain destructive bugs).

> You can find out how to
> write this script from http://docs.python.org/lib/os-file-dir.html

You're worried about security and you turn a novice with a scripting
language loose in the briar patch of unix permissions, on a remote server
no less?  And I thought I was sadistic! :)




More information about the Python-list mailing list