Title: Localhost permissions
Last modified: September 1, 2016

---

# Localhost permissions

 *  [landed](https://wordpress.org/support/users/landed/)
 * (@landed)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/localhost-permissions/)
 * If I install wordpress using no software other than the apache and php what groups
   will have access to the localsite ? Is there a terminal command that shows me?
 * I can see that my install for example is
    `drwxr-xr-x@ 6 myname staff 204 22 
   Jun 08:18 wp-content`
 * So I don’t understand why wordpress cannot upload to its own directory (not yet
   created) but wordpress can create this directory if it can upload I assume…
 * Please don’t answer with the 777 stuff that is all unsafe and not helpful we 
   all need to start to understand this stuff better.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [zerobullhosting](https://wordpress.org/support/users/zerobullhosting/)
 * (@zerobullhosting)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/localhost-permissions/#post-7608223)
 * Hi landed,
 * First you’ll want to check what user/group apache is running as. It can differ
   based on your distribution. For example, in RHEL/CentOS you can edit this in /
   etc/httpd/conf/httpd.conf – there’s a user and group setting pretty early on 
   in the configuration file. Lets say they’re both set to Apache.
 * For this, you’ll want to set Apache as the owner, and your SFTP user group as
   the group, then set folder permissions to 775 and file permissions to 664 (folders
   need execute permissions to display during browsing while files do not). [Here’s our article on it for examples](https://support.zerobull.hosting/support/solutions/articles/14000033738-wordpress-requires-my-ftp-credentials-for-updates).
   If you don’t require a SFTP user/group due to it being localhost (likely with
   shared folders on a virtual machine), you can use 755 and 644.
 * To answer the original question, the reason it can’t upload to its own directory
   is because Apache is likely running as a user that is different than the one 
   you’re using to upload files – so it doesn’t necessarily have permissions.
 * If you have any more questions, just let me know!
 *  Thread Starter [landed](https://wordpress.org/support/users/landed/)
 * (@landed)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/localhost-permissions/#post-7608253)
 * Interesting I found this file thus etc/apache2/httpd.conf
    and I had edited some
   older versions back when following some tutorial to set up a localhost on a mac…
   it had this
 * #User _www
    #Group _www User myname Group wheel
 * So I am going to see what this does I am thinking mac updates may change this
   file each time.
 *  Thread Starter [landed](https://wordpress.org/support/users/landed/)
 * (@landed)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/localhost-permissions/#post-7608255)
 * I think that fixed it thank you – maybe it was a mac update but now I know to
   look here each time I get funny errors.
    Restarting apache btw
 * > `apachectl restart`
 * for anyone else here and thanks to zero for the advice 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Localhost permissions’ is closed to new replies.

## Tags

 * [permissions](https://wordpress.org/support/topic-tag/permissions/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 3 replies
 * 2 participants
 * Last reply from: [landed](https://wordpress.org/support/users/landed/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/localhost-permissions/#post-7608255)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
