scireum / s3ninja

S3 ninja emulates the Amazon S3 API for developement and test purposes
MIT License
494 stars 91 forks source link

Permissions issue with a docker shared volume /home/sirius/data #164

Closed gumby0q closed 3 years ago

gumby0q commented 3 years ago

Hi,

  1. I am trying to use s3-ninja with docker compose and make a shared volume for it, but when the volume became shared I get an error with permissions (see the screenshot) compose file:

    version: "3"
    services:
    ninja:
    container_name: s3-ninja
    image: scireum/s3-ninja:6
    restart: always
    
    ports:
      - 9444:9000
    
    volumes:
      - ./data:/home/sirius/data

    screenshot: image

Even from UI the bucket cannot be created: image

Did I miss something?

  1. Is there exist the way to put some folders of container to tmpfs for holding the storage data (and database etc.) in memory (for tests as a use case)?
hggh commented 3 years ago

the s3ninja process runs as user id 2000. Could you please try to chown 2000:2000 data on your host machine?

hggh commented 3 years ago

for your second question: every buckets is just a directory within the "data" directory. You should be able to link a bucket (aka directory) to a tempfs with docker.

gumby0q commented 3 years ago
  1. Thank you, it helped!
hggh commented 3 years ago

geat! - we will update the documentation to make that clear.

If you have any further questions, please reopen the issue.

gumby0q commented 3 years ago
  1. It can be easily implemented with this compose file: gist

start container: docker-compose --env-file .env.test up --build -d stop container: docker-compose --env-file .env.test down

Note: do not forget that after reboot and after container restart all the data will be dropped.

Rugz007 commented 1 year ago

Still getting an issue even after running chown 2000:2000 data. Can anyone help me out? @hggh

hggh commented 1 year ago

Still getting an issue even after running chown 2000:2000 data. Can anyone help me out? @hggh

could you please post your docker-compose file?