[linux-cifs-client] suse vs fedora (mount -t cifs)

Steve French (smfltc) smfltc at us.ibm.com
Tue Sep 19 14:58:00 GMT 2006


>I want to mount samba share //10.0.0.1/test to local machine /test and
>I want the owner of /test to be user "pero".
>
>On Suse I did it like this:
>smbmount //10.0.0.1/test /test -o username=pero,uid=pero,gid=pero
>
>fedora doesn't use smbmount so I tried "mount -t cifs" as suggested:
>
>mount -t cifs //10.0.0.1/test /test -o username=pero,uid=pero,gid=pero
>
>but when I do 'ls -al /" I see that owner is not set as I wish it
>(owner and group should be "pero").
>
>How do I mount samba share with "pero" user as owner of mounted share ?
>  
>
CIFS  supports the Unix extensions to CIFS so will attempt to use the 
uid/gid on files returned from
the server, if the server (such as Samba) negotiates support for the 
CIFS Unix Extensions. 
If you want cifs to use a particular uid/gid for all files on the mount, 
then you must disable the
Unix Extensions (you can turn them on again before the mount to the next 
server if you want).
    "echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled"
then umount/mount.

If the server is Windows or NetApp (rather than e.g. Samba) ie does not 
support the
Unix extensions then what you already tried should work (you might try 
specifying the uid/gid
numerically - you might have an older mount.cifs before support for 
specifying uid/gid
by username was added).

For both SuSE and RedHat you will probably find cifs more 
functional/stable than smbfs but there
are a few exceptions (Kerberos support) which we are working.


More information about the linux-cifs-client mailing list