I've got a default installing of joomla under ubuntu 10.04. I've also transformed the permissions of index.php of template(apache user with read write permissions), to ensure that I'm able to alter the index.php from administrator screen. Everything works fine till here.

However after i alter the file from admin screen and save the file, its altering the file permission and getting rid of the write permission in the file. It will saves the alterations though.

Now because the write permissions are removed, after i attempt to install web site it provides me with error. So again I must by hand set the write permission for that apache user on index.php and install web site again, it runs good.

Does anybody determine if joomla is altering the file permissions, and then any idea the way i can tackle this issue.

Thanks, Tanmay

You are possibly impacted by a umask setting. Put umask(0133); inside your configuration file (or anywhere you would like, just make certain it comes down prior to making files).


  • r (read) includes a worth of 4 (binary value: 100)
  • w (write) includes a worth of 2 (binary value: 010)
  • x (execute) includes a worth of 1 (binary value: 001)

These permissions could be granted towards the owner, group and everybody else ('other').

Whenever a file is produced in PHP, it adds the 666 into it automatically. Out of this number, the umask value is taken away using bitwise AND. It appears like you've a umask of 0333. The easiest method to show ultimately by showing it:

PHP adds: rw-rw-rw- 0666

umask   : -wx-wx-wx 0333

result  : r--r--r-- 0444

And when you are using umask 0133:

PHP adds: rw-rw-rw- 0666

umask   : --x-wx-wx 0133

result  : rw-r--r-- 0644