I installed “racket” via the configuration file and got arc running (https://github.com/arclanguage/anarki). The anarki repo was cloned into my home folder “/root” and root is the only user account that is currently active. I am trying to run the news website from the repo with “./run-news.sh”. For this I had to adapt the shebang to find bash with “#!/usr/bin/env bash”. Now everything starts up fine.
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.