I cannot find where to set umask (to set proper permissions to files created by php scripts) in Fedora 19. (specifically, I want new files to have the permissions 664)
Asked
Active
Viewed 9,641 times
3 Answers
12
Here's how I finally did it, in case this helps someone:
Create the file
/etc/systemd/system/php5-fpm.service.d/php5-fpm.service.conf
(it must end in .conf) with the content:
.include /lib/systemd/system/php5-fpm.service
[Service]
UMask=0002
Then run
systemctl daemon-reload
systemctl restart php5-fpm
11
Just run:
systemctl edit unit.service. This will create override.conf for service. Inside add:
[Service]
UMask=0002
And reenable service: systemctl reenable unit.service
In your case unit.service is httpd.service
NotI.mportant
- 111
0
if you have a systemd service on CentOs7 you need to stop the service and enable it again to have it fixed
systemctl stop httpd
vi /usr/lib/systemd/system/httpd.service
Add this:
[Service]
UMask=0002
Save the file with esc ZZ. Enable and start apache again:
systemctl enable httpd
systemctl start httpd
Then the funny part is that i have chmod 774 and not 770 mmm
-rw-rw-r-- 1 apache apache 405163 Apr 26 11:04 0FreeRADIUS.pdf
-rw-rw-r-- 1 apache apache 42496 Apr 26 11:05 admiraliteitsraad.doc
Andrew Schulman
- 9,142
Marcel Kraan
- 17