Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied to static file directory after install dokku-shoreman #21

Open
samgclarke opened this issue Sep 16, 2015 · 3 comments

Comments

@samgclarke
Copy link

I have an application running on DigitalOcean under Dokku. The application works fine. As soon as I install dokku-shoreman plugin and make a push to the server (without changing any code), the static files directory where the app was happily writing before throws a IOError: [Errno 13] Permission denied error.

What could be causing this?

# dokku version
0.3.26
@statianzo
Copy link
Owner

dokku-shoreman overwrites the /start file in the image, altering the way processes get started from normal dokku. There may be an inconsistency that the plugin isn't accounting for.
The error is a python error, your app I assume. I would suggest doing some debug statements to compare the running user vs the owner+mode of the directory you're writing to.

@samgclarke
Copy link
Author

It appears the user running in the container and the owner of the denied dir are the same. The directory throwing the permissions error is inside the container though. I have already used the following to link this directory to a persistent directory on the host:

dokku docker-options:add <app_name> deploy "-v /var/www/files:/app/<app_name>/static/files

and the error is:

IOError: [Errno 13] Permission denied: u'/app/<app_name>/static/files/

Could it be that it's actually the host directory which is throwing the permissions error?

UPDATE:

I added some debug print statements to my app, and this is the output:

Without dokku-shoreman:

save to ======>
/app/<app_name>/static/files/
user ======> u31764
uploads dir user ===> u31764
uploads dir group ===> u3176

With dokku-shoreman

web| save to ======>
web| /app/<app_name>/static/files/
web| user ======> u19823
web| uploads dir user ===> root
web| uploads dir group ===> root

There are two interesting things here:

  1. with the plugin, the process is prepended by the string web|, presumably that is docker/shoreman running the the process?
  2. with the plugin the user and the owner of the directory in question are different. I would appreciate some advice on how to correct this in away which is reproducible in deployments.

I'm not familiar with shoreman, and have only just started using docker and dokku, so any advice here would be welcomed.

@artem-russkikh
Copy link

Same problem on ruby app

web| Errno::EACCES (Permission denied @ dir_s_mkdir - /app/public/system/...):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants