We really should have some more specific messages for these:

All necessary changes to ./sites/default/settings.php have been made, so you should now remove write permissions to this file. Failure to remove write permissions to this file is a security risk.

Is it too Unix-specific to talk about chmod 777? Many FTP applications have checkboxes for permissions, so we should probably just talk about general permissions for owner/group/all.

What permission should they set the settings.php file to in order for the installer to write to it? 777?

More importantly, what permission should they set after installation is finished? I'm guessing that 000 isn't going to work. :-)

-j

Comments

flevour’s picture

I don't know which is the permission shared hosting standard, but I guess 777 permission is an obligated choice for having the installer changing settings.php
After changes are made, 755 is the most-permissive choice I'd go with.

AjK’s picture

755 is the most-permissive choice I'd go with

You mean 644? That above would be for a directory, 644 for a file.

And how does that relate to Windows permissions? chmod 644 sounds pretty Unix-specific (unless FTP servers on Windows sort it out for you)

flevour’s picture

Yeah right. So I'd go for 666 during installation and 644 thereafter.
About the Windows sever permission handling I quote the following paragraph from the bottom of this tutorial (my emphasis):

Please note: This permissions tutorial applies to UNIX/Linux based servers only and although Windows does have a permission system, it's different and cannot be set by anyone using an FTP client.

I guess we need someone with some expertise in FTP and Windows to sort this out (even though from this paragraph you'd think there is no way to set file permissions, it sounds pretty weird).

techczech’s picture

I just installed Drupal Beta 1 and found the permissions for settings.php to be quite a barrier to entry. It doesn't bother me but many people might be put off by it. Would it be possible to ship with the permissions already set to 777? I think tarballs preserve permissions and then require the user to change them once the install was complete - basically keep the red message that appears under Administer right now. Optionally, a link to a Wikipedia entry on chmod http://en.wikipedia.org/wiki/Chmod might make it easier for some users.

At any rate, the instruction text should not just refer to the chmod number but also to the principle. I.e. "You should change permissions for user, group, other to write." This is because many admin panels (the default for many installs) do not allow for the change to be made numerically. How about this text:

"You need to change permissions of the sites/default/settings.php file to 'write' for 'user', 'group' and 'other'. This can be done via a control panel on shared hosting or by typing 'chmod 777 sites/default/settings.php' (without the quotation marks) in the shell command line. Once the installation is complete, you should change the settings back to 755, that is, uncheck write permissions from group and other."

catch’s picture

Version: x.y.z » 6.x-dev
Status: Active » Closed (duplicate)
zooney’s picture

If this is of any help, I think the secret of dealing with this particular permissions issue on Windows is to right-click the "settings.php" file and select "Properties..."

From there it seems to just be a matter of toggling the "read only" checkbox.

-Cursed-’s picture

Not sure if this is the right place to post this. I am having a problem with getting past the write permissions for the settings.php file. I have the settings on the file set at 666 and the default directory is set at 777. I am getting the SELINUX error "SELinux prevented httpd reading and writing access to http files" even though httpd_unified=1.

I am running this on a Fedora Core 10 box. I just recently upgraded the box I was able to get this work on Fedora Core 9 with out any problem. I have read the install.txt file and have followed it with out any success.

Any ideas?

Thanks in advance.