rpmbuild - Create log file when installing rpm -


what best way create log file in rpm spec file? service i'm creating runs under unprivileged user cannot create files in /var/log/.

you create /var/log/myservice/ directory , make owned user. inside %install or make install: (ignoring buildroot & such)

install -d /var/log/myservice -o serviceuser -m 750 

this assumes running service apache runs user apache , still puts logs in var/log/apache

then add corresponding rule /var/log/myservice in spec file.

%dir /var/log/myservice 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -