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.

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

mount -t cifs //192.168.0.10/smbshare /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
add comment

1 Answer

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