Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Changing File Permissions

This page needs a thorough review and overhaul!

I think the page deserves a thorough review and overhaul, written by someone who knows much more about this than I do...specifically, I think it should discuss the ins and outs of setting permissions to 755 or higher. The talk page is certainly not the right place to go into the details lol.

I noticed there's a lovely placeholder for page htaccess for subdirectories that would be tremendously useful to link to in the context of directory permissions settings -- if only someone with expertise would care to write it..

I completely agree with you! This page is a mess. It lacks a structure to guide through this important topic and propagates misconceptions and bad practices by concatenating bad-informed and often contradicting instructions.
As an example, have a look at these two paragraphs:
NOTE: If you installed WordPress yourself, you likely do not need to modify file permissions. Unless you are experiencing problems with permission errors, or you want to, you probably should not mess with this.
NOTE: If you installed WordPress yourself, you likely DO need to modify file permissions. Some files and directories should be "hardened" with stricter permissions, specifically, the wp-config.php file. This file is initially created with 644 permissions, and it's a hazard to leave it like that. See Security and Hardening.
What now? Who's right?
I tend to include a note in the page to warn users about the content, as it is done in the Wikipedia for controversal articles. GregorHoffleit (talk) 11:06, 23 September 2015 (UTC)

Title of page

chris/serendipity: IMHO, the title of this page ought to be How to make files / a file writeable or How to change file and directory permissions. It also ought to be kept in mind and linked to once an appropriate page has been written which talks about something that requires making files writeable. (2004/09/11)

Ctree 23:29, 7 Apr 2007 (UTC)

Main purpose of this page

The main purpose of this page seems to be telling people how to change file permissions, and secondarily what modes to change them to (and under what circumstances). Suppose someone is new to Wordpress, having just installed it, and wants to make a few changes to the css file before posting a first blog entry. Using the control panel, the user makes a couple minor changes and is confronted with the warning:

"You need to make this file writable before you can save your changes. See [Changing File Permissions|the Codex] for more information."

The user clicks on the link, which brings them to this article. Suppose the user either:

  • [1] doesn't have shell/SSH access,
  • [2] doesn't know whether he has shell/SSH access,
  • [3] doesn't know how to access the (unnamed) unix program,
  • [4] doesn't know how to use the (unnamed) unix program,
  • [5] doesn't feel comfortable using the (unnamed) unix program (perhaps because it's not GUI interface, or because he's not sure if there are safeguards to prevent unwanted mistakes), or
  • [6] would simply rather not use the (unnamed) unix program because he thinks there ought to be a more user-friendly solution

...in the case of any of these alternatives, the page is surprisingly unhelpful. The user is just plain stuck.

If there is no alternative for the newbie to using chmod (!), that should be stated clearly in the article. If there is an alternative, that should certainly be explained fully in the article.

This is very important, as this article could well be one of the first that new users look at, and file permissions may be a complete mystery to them. They may even respond to not having their question answered by wondering if they should expect to have trouble getting other very basic questions answered. -Drstevewright 18:53, 2 August 2008 (UTC)

Dead end page?

This is marked as a Dead-end page and yet it is liked to from the Main_Page. So why it is in this list? Lorelle 22:49, 28 Feb 2005 (UTC)

Dead-end pages are pages that do not link anywhere, so you can't go anywhere from the page - ergo - dead-end, like in real life.
Carthik 23:31, 28 Feb 2005 (UTC)
So if there is a link in the page to "anything" is isn't dead any more? But it is if the whole world links to it but it doesn't link to....How guruish ;-)
Lorelle 03:45, 1 Mar 2005 (UTC)

Don't recommend mode 777!!

The page currently recommends mode 777, which is wide open. In shared hosting environments, unscrupulous folks might leverage this in unpleasant ways.

I think mode 760 might be a better recommendation: full control for the directory owner (the user), readable and writable by the web server, and no access for anyone else.


When changing permissions to 760, people cannot view the website though.


From a security standpoint, mode 750 is better than 760. Mode 760 is rwxrw---- (owner can do anything, group can read or write, others can do diddly); Mode 750 is rwxr-x--- which means that the group can read and execute, which allows the php scripts to run correctly. If the directory/files are owned by the user and the group that the web server runs under, then the server operates correctly. Note that this does cancel the ability to edit files with WordPress, which, unless you're sure that you're not going to get your passwords sniffed trivially (network you are logging in from is trusted and host is trusted) is a Good Thing. If you need a plugin to have write access or want to edit templates through Wordpress, you'll need to use mode 770, which I suggest only turning on for the files that need it, when they need it. --Eads 18:49, 15 Jun 2005 (UTC)

Use FTP Client

You don't need to sweat the SHH etc. Use your FTP client as described at #1. Disregard the rest. Moshu 19:28, 2 August 2008 (UTC)

Notes section

for directories themselves, only modes 0,1,5,7 have any meaning

I presume you are talking with specific relevance to web servers, as it's perfectly meaningful to apply non-executable permission sets to a directory for various reasons, just that the use-cases within web-served areas are fewer. mrmist 21:21, 19 January 2009 (UTC)

Show Hidden Files Instructions for FileZilla

Version 3.3.5.1 of FileZilla is current as I write this. The main View menu has no option for "Show Hidden Files", making these instructions (http://codex.wordpress.org/Changing_File_Permissions#Unhide_the_hidden_files) impossible for users to follow.

This is a process apparently needed for installation to a sub-directory, an option prominently listed as part of the widely touted "Famous 5-minute Install".