#344 closed Enhancement (fixed)
Set correct permissions on html/cache, without needing umask [patch]
Reported by: | Nicolas | Owned by: | Rytis |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Web - Project | Version: | |
Keywords: | permissions umask patch | Cc: |
Description
When trying to run the upgrade script on my recently-installed project, or manually delete the html/cache directory, it errors with Permission denied. The cache directory is owned by user www-data, group www-data, permissions 0740 (drwxr-x---
, note no group write). Both 'www-data' and 'boincadm' belong to group 'boinc'. Looking at cache.inc, it seems it's creating the directories with permissions 0770
(with group write), but with the umask at its default 0022
, it ends up being 0740
.
ServerIntro#permissions mentions setting umasks on both boincadm
and apache
users to allow group write (but there is no further instructions on how to do that). The old GroupPermissions page mentions umasks as part of an alternative and non-recommended permission configuration. Additionally, the server admin said:
I've been reading a few bits about setting umask for apache and it's not at all straight-forward - really not recommended
I attach a patch for cache.inc that chmod
s the directory after creation, forcing it to have the correct permissions. That makes it work without the need for umask. I will have a look later for other PHP-created files or directories that may need similar handling.
Attachments (1)
Change History (4)
Changed 17 years ago by
Attachment: | cache_no_umask_needed.diff added |
---|
comment:1 Changed 17 years ago by
Summary: | Set correct permissions on html/cache, without needing umask → Set correct permissions on html/cache, without needing umask [patch] |
---|
Add patch availability to ticket title.
comment:2 Changed 17 years ago by
Keywords: | patch added |
---|
comment:3 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch to cache.inc to make it set correct permissions