I can’t seem to find this anywhere. Does anyone know where there is a definitive list of Windows/Linux permissions for noobs for all folders in WordPress? I’m ok with chmodding, chowning and chgrouping, I just don’t seem to be able to make it possible for users to upload files (images are ok for some reason) to a server. I’ve tried on both Windows and Linux, with Linux being my preferred platform, but to no avail.
Just once and for all I’d like to know what I should do here! Is there a list out there??!
This is how I do it (change the stuff within brackets to your environment:)
The following files need to be writable:
if you want to allow wordpress updates, simply set
./
to be writableNow if you’re asking whom to grant write/execute permission, it depends on your server config,
on the httpd user/group and the file’s owner.
You should allow
600
for files and700
for directories. if it doesnt work, include group permission660
and770
. Some servers need666
and777
tho but you might have a chrooted environment and it would not even matter for other vhosts / shares which permission, because you can’t break out of the chroot.WordPress uses the httpd user to write, but you probably use the ftp user to write.
It’s just all about getting to know who does what, and that this is not the same on all servers.
if the files belong to the FTP user but the www user is in the assigned group =>
660 / 770
if the files belong to the www user but the ftp user is in the assigned group => 660 / 770
if ftp and www are the same user => 600 / 700
if at least 1 of the two users is not in the files group AND not the owner => 666 and 777
Firstly, change your file and folder ownership to your web server user (apache, nginx, www-data, etc)
You can do this using:
Then change your file and directory permissions (as recommended by the WordPress Codex). The first command will change your directory permissions. The second command changes your file permissions. The
.
indicates that it will change everything from the current directory.If you want to read more about securing your WordPress installation see here: http://codex.wordpress.org/Hardening_WordPress#File_permissions
The best way to set permissions for WordPress if you are using Linux Ubuntu is to give ownership of the directory to the apache user:
Source: https://www.digitalocean.com/community/articles/how-to-install-wordpress-on-ubuntu-12-04