|
From: Etienne J. <lap...@gm...> - 2018-09-11 10:38:13
|
Hello. In fact, I am using Wrapper with the projet Jenkins Runner: https://github.com/mnadeem/JenkinsRunner The service is run as a specific user, let's say "jenkins". As I am using it under "Ubuntu", I wanted to centralize logs as it is done. So I created a folder /var/log/jenkins, and logs are created with name like jenkins.log. What I wanted, is to have permissions for owner jenkins, and group adm, as if I did something like this : mkdir /var/log/jenkins chown jenkins:adm /var/log/jenkins But when log files are created, the ownership is something like jenkins:jenkins. Group may comes from the default group for user jenkins. But I do not want to put user jenkins in group adm by default, because this is not an administrator. So in fact, this is not a matter of changing the owner (my bad for the description), but more changing the group. If not possible, I will find a way to do it with configuration on the LInux system. Regards Etienne Jouvin Le mar. 11 sept. 2018 à 04:17, Maxime <ma...@ta...> a écrit : > Etienne > > Thank you for your email. > > Are you running the Wrapper as root? > The Wrapper can change the permissions of the log file because it is owner > of it, but it cannot change the ownership (this would require running > itself as root anyway). > The Wrapper creates the log file, writes in it and rolls it if needed, so > usually the user of the Wrapper process is also the owner of the log file. > For this reason there is currently no property to change the owner of the > log file. > > May I ask the use case in which you need to have the owner of the log file > different than the user of the Wrapper? > > Best Regards, > > Maxime > > > > |