I've got a problem with my forum platform being unable to install modifications, as it complains the "Packages" directory isn't writeable. It's chmodded to 0777, so it's not a permission issue, but an ownership issue.

The user www-data is part of the www-data group, and all files under /var/www/example.com are owned by www-data:www-data

Can anyone help?

migrated from serverfault.com Mar 1 '14 at 18:46

This question came from our site for system and network administrators.

  • What's with the downvote? If I haven't included all of the information necessary then please ask me for it, as I don't understand, that's why I'm here for help. – i-CONICA Feb 25 '14 at 11:49
  • Also I found it unjust, thus compensated. – peterh Feb 25 '14 at 12:33
  • Are you getting this error when using apt? Can you share with us the complete output error and the permissions under /etc/apache2? – fgbreel Feb 25 '14 at 13:07

This should be a comment - it's not an answer as there's not enough information in the question to identify the issue.

so it's not a permission issue, but an ownership issue.

Ownership is permissions - and if the directory is 0777 then the ownership is not the problem.

In addition to the visible file permissions, access to write a file is also subject to:

  • SELinux constraints
  • AppArmor contraints
  • filesystem attributes
  • filesystem acls
  • whether the filesystem is mounted read-only

IIRC, except for the mount option, these are not enabled by default on Ubuntu - but have you checked?

Are there files inside this directory which are not writeable by the webserver uid?

What happens if you to write to the directory as the www-data user?

You did not say what the software producing the error is.

  • apparmor can be enabled on ubuntu by default, to disable run /etc/init.d/apparmor teardown – ptman Feb 25 '14 at 13:48
  • Hi, Thanks. It's a Ubuntu 12.10 installation, no gui, on a VPS. Other than things I've changed, such as installing apache2, mysql, php 5.5.8, etc, I've not touched anything in your list, so they should be at default status. I don't know how I'd check if apache is able to write to the directory... :S – i-CONICA Feb 25 '14 at 13:55

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.