Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 moved from managed VPS to unmanaged VPS few weeks ago and set it up as I could find guides on net. I've installed Kloxo as my webui for server management etc.

I have a problem with ownership permissions. Most of my websites are running Wordpress, and it is crucial for me to have apache permissions on those folders so WP can do updates and install plugins. But when I give apache ownership ftp breaks in a way that I can't write anything.

I found that groups are for this, and did add apache and ftp to the same group and chowned the folders, but without success. It gives me, or the 403 forbidden in some cases, or the ftp access but not the apache. I'm a bit confused on how to set things up :|

I was also trying to switch to suphp as it can solve some things hear (as I can read), but I have php 5.2.17 version which doesn't go along O_o

I would upgrade to php5.3 if I'm sure that would solve problems, but as my sites need to be live, I have almost no room for playing.

What are your suggestions? I need to have both ftp and php(apache) write permissions!

share|improve this question

closed as off-topic by HopelessN00b Apr 9 '15 at 19:07

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

You need to make sure you change the group of apache and FTP user to be for example new_group.

Then, you need to change the ownership and permissions of files/folders using the following commands:

$ sudo chgrp new_group -R /path/to/folder
$ sudo chmod g+rwx /path/to/folders
$ sudo chmod g+rw /path/to/files

Folders should be given x permission to be able to access them.

share|improve this answer
1) usermod -g new_group apache (remove apache from apache group) OR useradd -G new_group apache (add apache to a secondary group) 2) how do I allow apache to delete an FTP_user file and vice versa? Say in the case of a plugin that was created by ftp_user and updated by apache. – csi Feb 28 '13 at 23:54

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