Open MrksHfmn opened 4 years ago
try USERID and GROUPID environments instead "1000;markus;1000" on command. I had same issue but I resolved with it.
version: '3.8'
services:
samba:
image: dperson/samba
environment:
- TZ="Europe/Berlin"
ports:
- "137:137/udp"
- "138:138/udp"
- "139:139/tcp"
- "445:445/tcp"
restart: unless-stopped
volumes:
- /home/user:/home/user
command: >
-u "user;pass;1000;user;1000"
-s "user private share;/home/user;yes;no;no;user"
-p
Works for me. I think you should add the "-p" flag in command.
I was able to get write access by resetting the forced user and group using
-g "force user =" -g "force group ="
The force user being set to smbuser was preventing me from being able to write to my home dir.
I manually edited /etc/samba/smb.conf, but will try the
-g "force user =" -g "force group ="
option next time I recreate the container.
Using the -p option just chmod'd every file to another user - which is INSANE!!!
disable the option vfs in smb.conf like this:
# vfs objects = catia...
I was able to get write access by resetting the forced user and group using
-g "force user =" -g "force group ="
This was what i needed. It was very frustrating wondering why I created a USER=foo;foo;1000;foo;1000
and writes being performed under that user was writing under USERID
and GROUPID
(i.e. smbuser
's permissions).
Perhaps im missing something, but i'm not getting why the user is forced to be smbuser
in this image. The entire point of a user system is that a user connecting to a share should run under their own permissions. And force user
does the opposite, making all users run under a specific user's permission: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server#Using_the_force_Parameters
thanks a lot for the docker image! so far it works really well, unfortunately i can't write with my user. the write permissions on the host system are correct. i tried to set the uids and gids in the compose file.
Host system: