I have an Ubuntu staging server on AWS which runs a tiny Sinatra app using Thin webserver.
The sinatra app runs some git clone
commands when invoked and everything works great when I run rackup
from my user.
Naturally I want to run the server as a daemon, for this I used rackup -D
and invoked the app. This time, I got an exception from git which tells the daemon is not authorized to write to the target folder:
could not create work tree dir 'path/to/clone': Permission denied
As I understand it, daemons have the same privileges as the user who run them so how come the task fails?
I also tried chmod -R 777
the directory but it didn't work..