title: What are the suitable permissions for WordPress on a VPS?
body: <p>Recently, I have migrated to a self managed VPS and run a few WordPress websites. But what really confuses me how WordPress won't upload, modify files and folders without 777 permissions. I know a few things about Unix and I do know that giving any file/folder 777 is very, very dangerous but I can't help it since it just doesn't work without that permissions.</p>
  
  <p>Other than giving 777 permissions to wp-content/ and all its sub directories and files, I also  did <code>chown apache:apache -R wp-content/</code> which gives the ownership to the user and group apache. Only then everything "works".</p>
  
  <p>So, how do I make it work with the right permissions and user/group on a VPS? I have seen somewhere from a Google search that I need to add a few user into the same group. I do not understand how that works. I have also seen that I need to add FTP info in the wp-config.php file.</p>
  
  <ul>
  <li>I have created a ftp user with the username ftpuser and have vsftpd running. Why? Well, WordPress requires a FTP connection, it keeps prompting me for one.</li>
  <li>All the files and folders of wp-content/ are set to usergroup apache:apache with perms 777</li>
  <li>I have tried permissions 755, 775 for folders/directories and 664, 644 for files. It won't work</li>
  <li>OS I am running: Ubuntu Server, CentOS</li>
  </ul>
  
  <p>That's all I can think of now, will update later on.</p>
  
  <p>Thank you so much for you help.</p>