Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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").

share|improve this question
    
Check the UID and GID on both ends of the affected users. –  Michael Hampton Aug 24 '13 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. –  Luca Carlon Aug 24 '13 at 19:52
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.