I have configured a dradis.service file in /lib/systemd/system, it is called dradis.service. And it is its content:[Unit]Description=Dradis web application[Install]WantedBy=multi-user.target[Service]WorkingDirectory=/usr/lib/dradisExecStart=/usr/bin/bundle exec rails serverType=simpleUser=userGroup=useruser is in the sudoers group.The problem is when i try to start the service with sudo service start dradis commandObserving log with sudo journalctl -u dradis -f:Started Dradis web application.Faraday::Builder is now Faraday::RackBuilder.Rails Error: Unable to access log file. Please ensure that /usr/lib/dradis/log/development.log exists and is writable (ie, make it writable for user and group: chmod 0664 /usr/lib/dradis/log/development.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed./usr/lib/dradis/config/initializers/resque.rb:3:in `initialize': Permission denied @ rb_sysopen - /usr/lib/dradis/log/resque.log (Errno::EACCES)Taking in example the command specified in dradis.service file, /usr/bin/bundle exec rails server:If in the /usr/lib/dradis as user i will execute sudo /usr/bin/bundle exec rails server all it is going well;If in the /usr/lib/dradis as user i will execute /usr/bin/bundle exec rails server i am obtaining the same error;Where is my error in configuration file dradis.service in order to use sudo service start dradis?Where am i falling in a wrong think?
Service Start Issue Systemd
debian;systemd;kali linux;services;ruby
Since you apparently need to run this as root (using sudo), why don't you remove:User=userGroup=userFrom your service file? System D service files are run as root if not told otherwise.