But: when I try to access the webserver via localhost:8080, the console prints out a lot of “error 13: permission denied” errors for log files etc. under /root/anarki/www/logs. I do not understand this, because the server is started as root. In addition, I chmod the /root/anarki/www folder to 777 and tried again, same error.
Is there any security concept that takes action here and I am not aware of?
This is the error for the file:
[pid 26182] open(“/root/anarki/www/logs/srv-2018-07-21”, O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK, 0666) = -1 EACCES (Permission denied)
Your comment also lead me to another thing: although the initial bash script is launched as root, it seems like the web server itself runs as user ‘2’:
The webserver must drop the root permission as part of it’s startup. This is application specific. Because /root has mode 0700 the new user doesn’t have access to the files.
Try to checkout the repo under /opt/anarki for example and try to run it there. Or figure out where in the code it changes the user and remove that option.