0

I want files created by Apache to have 660 permissions, so I added the line "umask 007" to the file "/etc/sysconfig/httpd" and it works MOST of the time (as weird as that sounds).

For example, these files were created by Apache and the first one has the correct permissions, but the others don't.

-rw-rw---- 1 apache psacln 0 Aug 4 17:20 timthumb_cacheLastCleanTime.touch

-rw------- 1 apache psacln 124670 Aug 4 17:46 timthumb_int_00d3cbe9ad96f30121f17bbe1a92b42e.timthumb.txt

-rw------- 1 apache psacln 290077 Aug 4 18:27 timthumb_int_02d34e93c41599570c5302d6a08c8ba6.timthumb.txt

I'm not sure what to look for in order to fix this as it seems the UMASK setting is being ignored for some files. The problem here is that the FTP user (member of the psacln group) can't read the files that don't have group read permissions (because for security reasons I don't want to give permissions to "others").

Let me know if you have any idea why this may be happening.

ekad
  • 13,718
  • 26
  • 42
  • 44
Juan Pablo Barrios
  • 373
  • 1
  • 3
  • 5

1 Answers1

0

umask controls which file permissions are set for files and directories when they are created. Most probably there is a code that is changing the permissions after the creation.

Erki Aring
  • 1,736
  • 10
  • 13