Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm very new to server management, I literally just set this up for the first time a couple weeks ago, no idea what I'm doing.

In order to allow WordPress to run updates, apparently everything needs to be owned by www-data, but if everything is owned by www-data, I can't FTP with the user revxx14. When I try, I can't make any changes (deletions, additions, updating files, nothing. I get permission denied errors across the board). Is there a way to give my user the same permissions as www-data, so that I'll be able to keep www-data the owner, but still be able to make changes via FTP?


share|improve this question
have you added the right users to the right groups on the system? –  PatomaS Feb 28 at 2:13
I've only set up one user, so I think so? How could I check? I'm completely new to Linux and hosting a server. –  Rev Feb 28 at 17:03
add comment

1 Answer 1

Yes you can. I do not know WordPress, but this seems like just a permissions issue anyway. You can do one of several things. First, if the user www-data can FTP then that would be expedient, but perhaps not as safe as you want it to be since www-data should not have FTP permissions for security reasons. Alternatively, your user revxx14 could be modified to join the group that www-data belongs to and the file permissions modified to allow group modifications. This would allow you to drop the files into place, but you may still need to change file permissions.

However, the best solution is what I do. I create a temporary directory within the users home directory (in this case revxx14). I FTP the files there. Then I SSH in and copy the files from the temporary directory to the website with appropriate permissions. You would use cp to copy the files from your temporary directory to the destination, chown to change the destination file ownership, chgrp to change the destination file group ownership, and lastly chmod to change the permissions of the destination files. Lastly, use ls to check that you did your work correctly. Take note of the file ownership, group ownership, and permissions before you begin.

If you are not familiar with this process, create a situation where you practice using these commands where it would not matter if you make a mistake. Perhaps from one user to another user temporary directories. You may need to use mk to make the temporary directories.

Keep in mind that the files withing the web space are set specifically for security reasons and that should not change. If you copy these files from your temporary directory to the web space, then the files would have revxx14 users ownership, group ownership, and default permission. This means that for each file you copy, you would need to set the ownership, group ownership, and default file permissions to match the original file or other similar files. For example, some may have execute permissions while others only have read or read/write.

For myself, I know my files ownership and permissions natively so I can do mass file ownership and permissions changes using wild cards. I would only recommend using wild cards when you are sure of what you are doing. If you feel comfortable with the commands above, then you can use wildcards too.

share|improve this answer
I'm pretty sure the user is part of the same group, so how could I allow group modifications? A string to type in to my SSH client or an article explaining this would be very helpful. Thanks. –  Rev Feb 28 at 17:04
First become familiar with chmod. From shh, type man chmod and read. This is important because without seeing exactly what you are seeing, I cannot give you specific advice. However, I can give you this. Chmod changes file permissions. At the very least, you will need to change write permissions for the group. The command would be chmod g+w filename where g means group and +w means add write permission. To remove, use -w. File name can be a wildcard. This example may be enough to get you started. O'Reilly has a pocket sized Linux command reference I use often. You should get a copy. –  closetnoc Feb 28 at 17:13
add comment

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.