Joomla: Template parameter file is not writable

While working with joomla themes, one might come across this problem of the template parameter file not being writable. You may have tried to change the permission of params.ini to 0755, but somehow the permission is reset to 0555 everytime you save your changes. What could be the problem?

Seems like the answer lies in the com_template core component. Open the file ~/administrator/components/com_template/controller.php and search for this line “Could not make the template parameter file unwritable”. You’ll see that this component is actively reseting the permission to 0555 with this code:


if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0555')) {
JError::raiseNotice('SOME_ERROR_CODE', JText::_('Could not make the template parameter file unwritable'));
}

So the solution becomes straight forward – change the ‘0555’ to ‘0755’. Do not worry about security concerns as you are only granting write permission to the owner.

Leave a Reply

Your email address will not be published. Required fields are marked *