I have a config file /etc/tmpfiles.d/test.conf
:
z /dir/* 660 - - -
z /dir/subdir 2770 - - -
z /dir/subdir/* 660 - - -
Z /dir - root test -
When I run systemd-tmpfiles --prefix=/dir --create /etc/tmpfiles.d/test.conf ; ll /dir
, access rights of /dir/subdir
are randomly
- sometimes
drwxrws---
(from the/dir/*
rule) and - sometimes
drw-rw----
(from the/dir/subdir
rule).
How do I make it deterministic?
The point is that directory /dir
contains a lot of files and one subdirectory and I want to set rw
access rights to the files and rwx
access rights to the subdirectory.
Centos 7
Literal (un)match of
/dir/subdir
in/etc/tmpfiles.d/test.conf
:Suffix (un)match of
/dir/*.test.sh
in/etc/tmpfiles.d/test.conf
:I don't like this solution. Someone please come up with anything better.