Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I mount a samba share like this from a linux server using ACL in ext3...

mount -t cifs // /mnt/smbshare -o user=root password=secret

...and access the share with linux/smb-user smbuser. I have given smbuser write access to all catalogs, but when I write something to the share the owner becomes root (the user that mountet the share).

Is there any possibility to make smbuser the owner of the files/catalogs he creates even if the share is mountet by the root-user?

This case is supposed to work on a linux terminal server so many different users access the smb share (mountet by root).

share|improve this question
I want to mount this in fstab - so this isn't inside a script that every runs when a user logs on. – MyOnlyEye Jan 17 '10 at 15:57

just add the the parameters uid=smbuser,gid=<smbusergroup> to your mount command and all files and directories will belong to smbuser.

share|improve this answer
But what do I do when smbuser2 writes something to the common share on the terminal server? (which then writes everything as smbuser) – MyOnlyEye Jan 17 '10 at 14:08
as i understand this, this is different from what you asked first. what is your final goal or what other requirements do you have? – Christian Jan 17 '10 at 17:21

Your Answer


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.