Re: [CentOS] el7 systemd service:: ensure var/log owner when User is specified

2021-02-11 Thread Strahil Nikolov via CentOS
Is there any reason to use a service file to create the logs ?After all we got systemd-tmpfilesfor that purpose. Best Regards,Strahil Nikolov ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] el7 systemd service:: ensure var/log owner when User is specified

2021-02-10 Thread Simon Matter
> Hi! Does anyone have an idea how can i (in a nice way [1]) to ensure > ownership/permissions of log directory in /var/log for a unit > that drops privileges to a user (with User=/Group=) > > [1] The ugly way being with script in StartPre and sudo in Start > so i want to use User= > I'm aware of L

Re: [CentOS] el7 systemd service:: ensure var/log owner when User is specified

2021-02-10 Thread Anthony K
On 10/2/21 4:21 am, Adrian Sevcenco wrote: Hi! Does anyone have an idea how can i (in a nice way [1]) to ensure ownership/permissions of log directory in /var/log for a unit that drops privileges to a user (with User=/Group=) [1] The ugly way being with script in StartPre and sudo in Start so i

Re: [CentOS] el7 systemd service:: ensure var/log owner when User is specified

2021-02-09 Thread Jonathan Billings
On Tue, Feb 09, 2021 at 07:21:40PM +0200, Adrian Sevcenco wrote: > Hi! Does anyone have an idea how can i (in a nice way [1]) to ensure > ownership/permissions of log directory in /var/log for a unit > that drops privileges to a user (with User=/Group=) > > [1] The ugly way being with script in St

[CentOS] el7 systemd service:: ensure var/log owner when User is specified

2021-02-09 Thread Adrian Sevcenco
Hi! Does anyone have an idea how can i (in a nice way [1]) to ensure ownership/permissions of log directory in /var/log for a unit that drops privileges to a user (with User=/Group=) [1] The ugly way being with script in StartPre and sudo in Start so i want to use User= I'm aware of LogsDirector