The sites directory and associated settings.php file has the wrong permission:

$ ls -al
total 28
drwxr-x--- 5 hostmaster hostmaster 4096 2008-04-03 15:25 .
drwxrwxr-x 6 hostmaster hostmaster 4096 2008-04-03 15:57 ..
drwxr-x--- 5 hostmaster hostmaster 4096 2008-04-03 15:24 files
drwxr-x--- 2 hostmaster hostmaster 4096 2008-04-03 15:24 modules
-r-xr-x--- 1 hostmaster hostmaster  280 2008-04-03 15:45 settings.php
-rw-r--r-- 1 hostmaster hostmaster  593 2008-04-03 15:45 site.php
drwxr-x--- 2 hostmaster hostmaster 4096 2008-04-03 15:24 themes

Workaround:

chmod o+X .
chmod o+r settings.php

Resulting permissions:

total 20
drwxr-x--- 5 hostmaster hostmaster 4096 2008-04-03 15:24 files
drwxr-x--- 2 hostmaster hostmaster 4096 2008-04-03 15:24 modules
-r-xr-xr-- 1 hostmaster hostmaster  280 2008-04-03 15:45 settings.php
-rw-r--r-- 1 hostmaster hostmaster  593 2008-04-03 15:45 site.php
drwxr-x--- 2 hostmaster hostmaster 4096 2008-04-03 15:24 themes

Maybe that should be:

chown :www-data . settings.php

... instead... Not sure about that. There's also that hack to provide the db user/password through the apache environment we could consider...

At any rate, with this (and after working around the other bugs I filed today) I was able to create my first drupal through hostmaster, even though hostmaster tries to recreate the site at every cron job...

Comments

anarcat’s picture

Assigned: Unassigned » anarcat
Status: Active » Fixed

I think I fixed this in http://drupal.org/cvs?commit=110215

The hostmaster user needs to be part of the www-data group, however, and this needs to be documented, i'll file a seperate bug for this.

anarcat’s picture

Title: wrong permissions in sites/<host>/ » wrong permissions for settings.php
Status: Fixed » Needs work

Actually, it's not quite there yet:

-r-xr-x---  1 hostmaster hostmaster  282 2008-04-11 17:37 settings.php
anarcat’s picture

Assigned: anarcat » Unassigned
anarcat’s picture

Project: Hosting » Provision
Assigned: Unassigned » anarcat

I'll try to fix that today.

anarcat’s picture

Status: Needs work » Fixed

I fixed this in a later commit. I simply made the settings.php chgrp www-data.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

  • Commit 2bdf5e7 on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by anarcat:
    try to fix #242366: uncomment the permission checks in sites directory...
  • Commit 8c88599 on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by anarcat:
    fix bug #242366: proper permissions for settings.php