I have a program on Ubuntu Linux that creates a logs/error.log
file with a permissions 660
(rw-rw----
) or 640
(rw-r-----
). But I want the file permissions always to be 666
(rw-rw-rw-
) (including when the program creates the file).
Restrictions:
- I can't modify the program. Therefore, I can't change
660
mode using by the program for a new files. - The program can recreate the file at any time. Therefore, the solution with a single manual execution of
chmod
is not suitable. - I need to add a bits of permissions, but not subtract. Therefore,
umask
andsetfacl
are not suitable.
666
by exporting yourumask
as000
, but that would apply to all files, and anyway many applications over-ride that for their own reasons.rw
mode forother
I can't edit the mysql log files in mounted as volume folder from host.user:group
"; changing the file to666
is simply the wrong approach here; instead, you'd change the group membership of the process trying to access it.