1

I'm sharing a directory on my Mac using Samba. When the client (Raspebian) creates a file on the mounted share, the file is owned by the user on the client and the permissions are set to -rw-------.
Is it possible to have the user on the server own the file? If not, how do I make newly created files have different permissions?

My fstab looks like this:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swapfile swap[on|off]  for that
/dev/sda1       /mnt/tm         auto    defaults        0       0
/dev/sda2       /mnt/data       auto    defaults        0       0
//mbp/Downloaded        /mnt/downloaded cifs    defaults,user=usr,password=xxxx,uid=usr,gid=usr,nosetuids,rw,nounix,sec=ntlmssp      0       0

P.S. the last two options are apparently necessary for mounting shares from OS X. I couldn't mount without them.

0

Edit: oh, I'm sorry, this might not apply to Mac, I use it on Linux.

These can be set in smb.conf on the server.

I think what you are looking for is force user; create mask, force create mode and their directory creating counterparts. inherit owner and inherit permissions can be useful too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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