0

I am tasked with the process of installing and configuring a LAMP server from scratch for hosting Drupal sites.

I have installed the LAMP stack but I'm experiencing multi-user editing problems.

Users are not permitted to write into files/directories created by someone else as the following message shows:

drush dl admin_menu
Directory /var/www/drupal-7.34/sites/all/modules/admin_menu exists,  [error]
but is not writable. Please check directory permissions.

I know this is ownership issue resolvable with the chown command but I would like to avoid chown-ing every time someone attempts to edit a file or download a module into a project the person didn't create.

Can anyone give me details on how to configure my server so different users can access and edit websites files found in the /var/www directory?

0

Possibly create a group, chown all dirs to that group, and of course give at least rw permissions for group (x6x) with chmod

so:

  1. sudo groupadd drupal
  2. sudo chown -R :drupal /var/www/drupal-7.34/sites/all/modules/admin_menu
  3. sudo usermod -G drupal <username>
  4. sudo chmod -R +w /var/www/drupal-7.34/sites/all/modules/admin_menu

P.S make sure the user owning the web server service is also member of the group, unless owning all the dirs as user.

0

Add users to the www-data group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.