Skip to main content
Explain reference to permissions page linked to in answer
Source Link
greg_1_anderson
  • 21.4k
  • 2
  • 38
  • 47

You need to insure that the php process (web server) is a member of the group for the Drupal files. You should make sure that the owner of the files is some user other than the php process / web server, because you do not want to allow the web server to overwrite the Drupal code files.

To change the group of all of the files in your root:

sudo chgrp -R webgroup /path/to/drupal

To add a group to the web server user:

sudo usermod -a -G webgroup www-data

For more advice on correctly setting file permissions for Drupal, see Securing File Permissions and Ownership.

Edit: It was suggested that this answer be expanded to point out that the above page contains a script for setting your permissions. There is also a Drush command for setting permissions in progress at http://drupal.org/node/990812. Both of these scripts can be helpful, but only if you set the user and group ownership of your files correctly, and insure that the web server user is a member of the applicable group as explained above. Please read the quoted page carefully, as it explains these concepts.

You need to insure that the php process (web server) is a member of the group for the Drupal files. You should make sure that the owner of the files is some user other than the php process / web server, because you do not want to allow the web server to overwrite the Drupal code files.

To change the group of all of the files in your root:

sudo chgrp -R webgroup /path/to/drupal

To add a group to the web server user:

sudo usermod -a -G webgroup www-data

For more advice on correctly setting file permissions for Drupal, see Securing File Permissions and Ownership.

You need to insure that the php process (web server) is a member of the group for the Drupal files. You should make sure that the owner of the files is some user other than the php process / web server, because you do not want to allow the web server to overwrite the Drupal code files.

To change the group of all of the files in your root:

sudo chgrp -R webgroup /path/to/drupal

To add a group to the web server user:

sudo usermod -a -G webgroup www-data

For more advice on correctly setting file permissions for Drupal, see Securing File Permissions and Ownership.

Edit: It was suggested that this answer be expanded to point out that the above page contains a script for setting your permissions. There is also a Drush command for setting permissions in progress at http://drupal.org/node/990812. Both of these scripts can be helpful, but only if you set the user and group ownership of your files correctly, and insure that the web server user is a member of the applicable group as explained above. Please read the quoted page carefully, as it explains these concepts.

Source Link
greg_1_anderson
  • 21.4k
  • 2
  • 38
  • 47

You need to insure that the php process (web server) is a member of the group for the Drupal files. You should make sure that the owner of the files is some user other than the php process / web server, because you do not want to allow the web server to overwrite the Drupal code files.

To change the group of all of the files in your root:

sudo chgrp -R webgroup /path/to/drupal

To add a group to the web server user:

sudo usermod -a -G webgroup www-data

For more advice on correctly setting file permissions for Drupal, see Securing File Permissions and Ownership.