[systemd-devel] UMask attribute in service file
Oliver Graute
oliver.graute at gmail.com
Tue Jan 31 14:14:37 UTC 2017
Hello list,
I'am using the UMask attribute in my service file to define my umask
setting to 0027. In this service file I start a little c program which uses
fopen() to open a file.
the file permissions are
rw-rw-rw (0666)
instead of
rw-r--- (0640)
Is this a expected behavior?
some further background:
In my system there are different services started by systemd 225 (all
with UMask=027). Sometimes files are created with 666 sometimes with
640 as I wish.
ls -la
-rw-r----- 1 oliver oliver 75 Jan 11 17:30 log_20170111_163024_2.log
-rw-rw-rw- 1 oliver oliver 75 Jan 11 17:30 log_20170111_163024_3.log
-rw-rw-rw- 1 oliver oliver 75 Jan 11 17:36 log_20170111_163610_1.log
-rw-r----- 1 oliver oliver 75 Jan 31 13:38 log_20170131_123842_1.log
-rw-r----- 1 oliver oliver 75 Jan 31 13:57 log_20170131_125738_2.log
some clue whats going one here?
here my stub service definition:
[Unit]
Description=Start umask_test
[Service]
Type=simple
PIDFile=/var/run/umasktest.pid
WorkingDirectory=/home/oliver
User=oliver
Group=oliver
UMask=0027
Environment=
ExecStart=/home/oliver/umask_test
Best Regards,
Oliver
More information about the systemd-devel
mailing list