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

Working on a new client's dev site, which is a wordpress install on a Plesk box. I have SSH root access, and FTP access through a separate account.

What I've done so far

Initially I couldn't make any changes to any files at all. The permissions on all the template files looked a little screwy (644), so I figured change them to allow group, and add myself to the group:

  • CHMOD Recursive on the theme folder to set everything to 664
  • Quickly realised I'd broken it, set the folders to 755, kept files as 664
  • Ownership on all files is a mixture of root:root and 500:500 (there is no user nor group with the ID of 500 on the server).
  • Added myself to the group 'root' so I could modify the files too

The Problem

This worked OK, in terms of being able to edit the existing files, so I began working. However, I can't upload to the directory, even having run CHOWN -R root:root templatefolder/ and being in the root group.

I feel like I must be missing something obvious, and it's doing my head in.


Files in the install owned by 500 with group 500 - I've looked in /etc/group and /etc/passwd and there is no user nor group with this ID. Is that left over from another developer's setup or the previous server (they moved recently)?

Is being in the 'root' group enough, or do I need to own the theme folder as 'myftpuser' in order to upload and create new files?

Like I say, I have edit access, so I got myself this far. I'm now questioning what to do next!

share|improve this question
The uid the http service runs as must be able to write (and read) the upload directory. – 3molo Apr 1 '12 at 12:29
up vote 1 down vote accepted

You said you put the folder permissions back to 755. This means that you have to be the owner of the folder to be able to create files in it. The reason why your chmod broke when you changed folders to 664 is because folders need the execute bit. So you need to set the folders to 775 and make sure youre in the group that owns them.

Also, the better way to solve this is not to add yourself to the root group, but to change the group of all the files to one that youre in. Not a major issue, but its just good practice.
(An even better practice would be to utilize ACLs, but that goes beyond the scope of this question)

Lastly, the files that are owned by '500:500' are probably that was because that was the owner when they were extracted from the tarball when they were installed. You can change the ownership to match the other files without issue.

share|improve this answer
Thanks so much. So obvious now, clearly had a brainfart between 775 and 755! Wasn't too keen to change the group the files belong to as there is a development team in the Ukraine who built the site and still do work on it, and I didn't want to break anything for them! Sorry I can't upvote you but I don't have enough rep :) – Ben Apr 2 '12 at 13:30

Your Answer


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

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