Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having difficulty on our ubuntu server whereby I have an SSH user that when I create files using this user the ownership is web_user:www-data

The problem is when a file is uploaded or created using a content management system like joomla. When files are uploaded through Joomla - such as components / modules...

The ownership is set to www-data:www-data

This means that I need to then chown all new files to web_user:www-data so we can edit the files.

Is there a way to set for a directory and sub-directories that all new files created have the ownership of web_user:www-data?

Do I need to use something like setuid or setgid?

Any help would be greatly appreciated.

share|improve this question

migrated from May 10 '10 at 22:47

This question came from our site for computer enthusiasts and power users.

website questions are generally offtopic here. this question may be more suitable for our sister site, Server Fault. it will be migrated there shortly. you will need to register accounts on both sites, then associate them together (in your profile page, on the accounts tab) in order to regain ownership of the question after migration. – quack quixote May 10 '10 at 22:47

That's because php is running as that user. Try suphp

share|improve this answer

Instead of changing the ownership, does Joomla have a way to set permissions on files? If so, a permission level of 664 should allow you, or anyone in the www-data group to edit the file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.