-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Storage error EACCES (Permission denied @ dir_s_mkdir - /rails/storage/) #926
Comments
I had to change the permissions of the |
Can someone confirm if adding the following to your Docker compose file solves the issue? diff --git a/docker-compose.example.yml b/docker-compose.example.yml
index cbd5232..9b0fa88 100644
--- a/docker-compose.example.yml
+++ b/docker-compose.example.yml
@@ -37,6 +37,9 @@ services:
ports:
- 3000:3000
+ command: >
+ sh -c "chown -R rails:rails /rails/storage && ./bin/rails server"
+
restart: unless-stopped
environment: |
With this, the container fails to start with the following error.
This probably needs to be done as |
I think it would be better if it was added to the If the Lines 53 to 57 in 0593d8f
|
@amitash thanks for confirming! Could you try the solution I've posted below? @hkamran80 I'm thinking that instead of altering the Dockerfile, we may be better off just using a named volume rather than a bind mount (which is dependent on the host machine's directory structure/permissions): diff --git a/docker-compose.example.yml b/docker-compose.example.yml
index cbd5232..ad5220b 100644
--- a/docker-compose.example.yml
+++ b/docker-compose.example.yml
@@ -32,7 +32,7 @@ services:
image: ghcr.io/maybe-finance/maybe:latest
volumes:
- - ./storage:/rails/storage
+ - app-storage:/rails/storage
ports:
- 3000:3000
@@ -70,4 +70,5 @@ services:
retries: 5
volumes:
+ app-storage:
postgres-data: |
@zachgoll That's a good idea. That should fix the issues. |
@zachgoll indeed, it fixes the issue. |
@amitash going to reopen this mainly as a reminder so I remember to update the |
Describe the bug
Using latest docker guide from https://github.com/maybe-finance/maybe/blob/main/docs/hosting/docker.md
To Reproduce
Steps to reproduce the behavior:
Account
Choose
button to select a picture to uploaddocker container logs maybe -f
Expected behavior
Picture should upload successfully
Additional context
This also happens when uploading picture for financial institution.
The text was updated successfully, but these errors were encountered: