2

I am trying to change the ownership of a folder and all its contents to www-data, but am being denied permission to change it. I am root. and I've tried using sudo but nothing works.

eyedea@eyedea-ER912AA-ABA-SR1810NX-NA620:/var/www$ chown -R www-data.www-data /var/www/drupal/
chown: changing ownership of `/var/www/drupal/scripts/run-tests.sh': Operation not permitted
chown: changing ownership of `/var/www/drupal/scripts/code-clean.sh': Operation not permitted
chown: changing ownership of `/var/www/drupal/scripts/drupal.sh': Operation not permitted

1 Answers1

2

If /var/www/drupal is an NFS mount and rootsquash is enabled, you will get an error such as this. You'll have to make this change from the NFS server directly, or make the change as the existing non-root owner of these files.

It could also be that write permissions are not enabled on the files you are getting an error with. Make sure the write bit is flipped for at least the owner of the file.

mills013
  • 684