1

I'm using Samba for sharing files in a Linux Embedded. I need the permissions of the files to be of this type on the server:

-rwxrwx--- 1 user group

I shared those files with Samba and allowed the access to the only user "user". This works correctly. But if I mount using cifs, on the other end I get:

-rwxrwx--- 1 usbmux avahi-autoipd

What are those user/group? Can I somehow change this? Because this way I can do nothing on those files.

This is my configuration:

[luca_files]
comment = Luca's public files
path = <path>
force user = luca
valid users = luca
force group = luca
read only = no
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0
create mask = 0777
browsable = yes

where luca is a user that on the server is able to both read and write those files (he is in the group "group").

2
  • Check the UID and GID on both ends of the affected users. Aug 24, 2013 at 19:25
  • Ah, I see. The uid and gid are mapped to different users. I didn't know this. I didn't even know that uid and gid existed... But is it possible to change this? Like allowing my client to read/write those files provided the client has the password of course. Aug 24, 2013 at 19:52

1 Answer 1

1

Solution was pretty simple: just add these options to the mount options:

uid=<client_owner_id>
gid=<client_group_id>

this way it seems to work perfectly. Permissions are preserved and owner and group are mapped to those I specified in the mount options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .