Advertisement

configuration.php permissions keep changing to 444 [solved]

Discussion regarding Joomla! 2.5 security issues.

Moderators: mandville, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.
Locked
nate206
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Dec 21, 2011 5:45 pm

configuration.php permissions keep changing to 444 [solved]

Post by nate206 » Thu Jan 26, 2012 3:54 pm

I'm using Joomla 1.7.4 at the moment. Im testing the 2.5 version on my development server. I noticed the configuration.php permissions keep changing to 444 whenever I make a change in the global configuration area. Is this normal? Is Joomla doing this for security reasons? I dont mind the removal of the write permissions I would just rather they not be 444. Im using godaddy shared hosting and the php scripts are run as the ftp user. So i would rather the configuration.php be something like 640 removing ALL permissions for the other user. Just annoying that it keeps reverting to 444. Can anyone shed some light on this?

Advertisement
User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20674
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America/
Contact:

Re: configuration.php permissions keep changing to 444

Post by leolam » Thu Jan 26, 2012 4:06 pm

Normal behavior. If you change something in configuration.php through ftp you can set permissions in ftp to 644 and they should stay than on 644

Leo 8)
Joomla Professional Support Services
Over 35.000 support requests solved
Just contact us through the Joomla Support channels if you want help

nate206
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Dec 21, 2011 5:45 pm

Re: configuration.php permissions keep changing to 444

Post by nate206 » Thu Jan 26, 2012 5:57 pm

Thanks alot! You answered my question perfectly.

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15162
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: configuration.php permissions keep changing to 444

Post by mandville » Thu Jan 26, 2012 7:19 pm

Is this now to be marked as solved ?
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
portable mini golf https://www.puttersminigolf.co.uk/

nate206
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Dec 21, 2011 5:45 pm

Re: configuration.php permissions keep changing to 444

Post by nate206 » Fri Jan 27, 2012 3:58 pm

Sorry, yes you can mark this as solved.

bluesteam
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Mon Apr 02, 2012 11:30 am

Re: configuration.php permissions keep changing to 444 [solv

Post by bluesteam » Mon Apr 02, 2012 1:30 pm

Sorry for raising an old thread but how is this marked as solved? Whenever I edit any settings, it changes the permissions to 444 but then if you go in to "System Information" -> "Directory Permissions" it complains that the file is Unwritable so changing it back to 644 so that it is writable again makes joomla happy again and then change a setting and joomla is unhappy again.

What am I missing?

nate206
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Dec 21, 2011 5:45 pm

Re: configuration.php permissions keep changing to 444 [solv

Post by nate206 » Mon Apr 02, 2012 9:53 pm

I AM able to make changes through the Joomla global configuration menu without having to re-set the write permission on the config.php file everytime. I guess Joomla does that automatically. Configuration.php shouldn't be writable and I think it's just a security thing. Im using 2.5 Joomla. Im also NOT using the FTP layer. I would rather it revert to something like 640 or 440 rather than 444 since I dont want any permissions in the other category but I dont change the php too often anyway. I would imagine not all hosts would like 640 on the config.php but maybe Im wrong.

User avatar
PhilD
Joomla! Hero
Joomla! Hero
Posts: 2737
Joined: Sat Oct 21, 2006 10:20 pm
Location: Wisconsin USA
Contact:

Re: configuration.php permissions keep changing to 444 [solv

Post by PhilD » Sun Apr 08, 2012 6:03 pm

nate206 wrote:I AM able to make changes through the Joomla global configuration menu without having to re-set the write permission on the config.php file everytime. I guess Joomla does that automatically. Configuration.php shouldn't be writable and I think it's just a security thing. Im using 2.5 Joomla. Im also NOT using the FTP layer. I would rather it revert to something like 640 or 440 rather than 444 since I dont want any permissions in the other category but I dont change the php too often anyway. I would imagine not all hosts would like 640 on the config.php but maybe Im wrong.
Normal server operations (unless using php as an apache module) are file permissions are set to 644 and the files are owned by you. Most servers now run php as cgi or an equivalent and use some version of 'su' to allow the httpd process to run properly without ownership and thus permission issues.

Normal servers set up their masks to provide 644 on files which is the standard permission level when creating files.

[edit: was pointed out what I originally said was wrong. I think the following is basically correct now.]
When you edit the configuration file through the Joomla admin screens and save the edits, Joomla will delete the configuration.php file which it can do. Joomla will then ask the server to create a new file that it can populate with the config data. Once this is done Joomla will set the permissions on this file to 444.

When editing the configuration file offline by downloading with an ftp program, one can download the file when it is set to 444 (you can even delete it if you want), but you have to change the permissions of the file on the server to 644 before uploading and overwriting the file on the server with your locally edited version. failure to do this will result in an failed transfer error within your ftp program. The file will not be transferred to the server and the file on the server will not be overwritten.
Last edited by PhilD on Mon Apr 09, 2012 12:50 pm, edited 1 time in total.
Reason: Corrected some incorrect info
PhilD

Advertisement

Locked

Return to “Security in Joomla! 2.5”