Skip to content

Possible permissions problem and home user directory #16

Closed
@rourke

Description

@rourke

I have 2 folders /data/homer and /data/home-assistant. Both the folders and their content are owned by user victor and group victor. The permissions for the contents of the data folder is rw-rw-r-- or 664. I want to share the /data folder, but login with custom credentials. So I have the following docker command:

docker run -d -p 139:139 -p 445:445 \
  --hostname $HOSTNAME \
  -e TZ=Europe/Paris \
  -v /data:/data \
  elswork/samba \
  -u "1000:1000:victor:victor:RaNdOmPaSwOrD" \ # An existing user and group on my host filesystem, but a made up password
  -u "1001:1001:bob:bob:anotherpassword" \ # User and group does not exist on host filesystem, password is made up
  -s "Config:/data:rw:bob"

Some odd behaviour I don't understand:

  • When I log in as user victor I can view and edit the files, but when I log in as user bob I can only view the files.
    I tried to get both users in the same group, but the container does error out saying the group already exists.
    So victor: 1000:100:victor:users:RaNdOmPaSwOrD and bob: 1001:100:bob:users:anotherpassword - existing group on host filesystem. I also did recursive chown to the /data folder for this test.
    How do I also get bob to be able to edit files?
  • I also noticed if I log in with victor I also get a folder called victor, and for bob I get a folder called bob. I assume this is the user home directory which is set to not browsable in /etc/samba/smb.conf.
    When I commented out the [homes] share from this file the user directory was gone. Is this something you can change?
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions