Quote:
|
Originally Posted by Zigzagcom
I ran into an web-app called "loudblog" that does instruct to make a couple of directories world writable (for uploading audio content)
|
There are a number of applications that make the same recommendation. It's just sheer laziness on the part of the developers - it means they don't have to think about security. Unfortunately, it opens up the server to attack (particularly if you allow overrides - think .htaccess injection and ExecCGI directives).
It's a large risk, and it's *totally* unnecessary.
Take your example above - a web-based application that allows users to upload files. Now because these files are passed to Apache via some sort of web page, the user that actually does the writes to disk will always be - apache. It doesn't matter who is sending the files, it is apache that does the writes. Thus only apache needs write access to these areas; the recommendation to make the world-writable just doesn't stand up to scrutiny.
Quote:
|
Originally Posted by Zigzagcom
but then maybe there is a way to use group permissions instead.
|
There is *always* a way to set up the permissions to do what you want without using world-writable. The only possible exception to that is /tmp, and even then, I've seen 775 on that in certain (slightly strange) circumstances.
Vic.