The site.php file has the wrong permission, at the very least:
-rw-r--r-- 1 hostmaster hostmaster 774 2008-11-07 15:54 site.php
That's not a big problem because the sites directory itself is only accessible to www-data.
However, i feel the sites/* directories should be owned by the hostmaster group and readable by all:
drwxr-x--- 5 hostmaster www-data 4096 2008-11-07 15:54 .
There's no reason to restrict access to that directory (other than protecting the site.php file, which should have proper permissions in itself anyways).
In general, to allow access for developpers and others, the sites/ directory should have lax permissions.
Comments
Comment #1
anarcat commentedHere are the permissions I would like on the directory:
... where "users" should be configurable.
Comment #2
adrian commentedfiles needs to be owned by the web server group. It maintains readability / writeability for all files and paths created underneath that path using chmod g+S. You definitely do not want the file directory be writable by o+
themes/modules needs to be readable by the webserver, so I could see that maintaining the existing group on that could go. I would like to avoid more configuration though, so perhaps just leaving them in their original groups?
Comment #3
anarcat commentedA first attempt.
Comment #4
anarcat commentedAnother attempt that fixes also the site.php perms.
Comment #5
anarcat commentedAnother one that actually compiles and work:
Comment #6
anarcat commentedI'd like to have another pair of eyes before committing this.
Note that this doesn't resolve the issues underlined in http://drupal.org/node/334416#comment-1129042
Comment #7
anarcat commentedNew patch. Permissions on d5:
Perms on d6:
The latter is an issue, as the settings.php remains writable by the webserver. Drupal will yield a warning...
I'm committing the patch anyways, as this was probably the case before anyways.
Comment #8
anarcat commentedI verified that both sites work properly. Now we need to fix the perms on that settings.php file.
Comment #9
anarcat commentedI think this is mostly solved now, with the exception of security between sites, but that's another issue.