dperson / samba

Samba docker container
GNU Affero General Public License v3.0
1.5k stars 509 forks source link

Problems changing owner/group in docker compose #438

Open Rubiooo04 opened 1 year ago

Rubiooo04 commented 1 year ago

Describe the bug

Hello!!

I wanted to change the group and owner of the files that samba manages using the corresponding environment variables but this still does not pay attention to me

Docker-Compose

    environment:
      - USERID=1000
      - GROUPID=1000

Screenshot

(click to see the Screenshot) ![SMB ERROR](https://github.com/dperson/samba/assets/77902247/200e3045-7e2f-4e8f-beb6-4d3e4ea78404)

What have I tried for that?

I have tried using the environment variables

      -PUID=1000
      -PGID=1000

but still ignore me and in other services that ID works for me

pczekalski commented 1 year ago

You may need to change physical ownership of the files on the host machine (where you store your files physically) using chown, i.e.:

  1. Shut down container (not needed but ensures there are no access problems)
  2. chown 1000:1000 <yourpathtosmbvolumeonhostmachine> --recursive
  3. Start container