Cifs… Samba… wtf…

by rullzer on Mar.22, 2007, under Linux

So I was supposed to study my ass off today. Which I did. (OK well my ass is still on but I could use a drink right now after all the studying….) So I toughed lets give it a try to get cifs working in the network at home. So I wanted to mount some stuff. But it took the uid and gid of the server. Which of course are different from the once on my system. However I figured google is my friend. So the search begun. However one of the first results gave me:

Q:  I'm using the CIFS filesystem for mounting and I've set the UID/GID in
    the mount tab, but Smb4K does not seem to care about that at all!

A:  This is a Samba issue. If the target server supports the CIFS Unix
    extentions, the uid and gid option will be ignored. From the manual page
    of mount.cifs:

    [uid=arg|gid=arg]
      sets  the [uid|gid] that will own all files on the mounted filesystem.
      It may be specified as either a username or a numeric uid.  This
      parameter  is  ignored  when the target server supports the CIFS
      Unix extensions.

Doesn’t sound good now does it…. I also do not get why. Sure they have toughed of it (i guess) but why would i mount something with my login and then not want to be able to edit it? Ah well but we are not here to talk about that. It is about that when I pass a uid and gid to mount the share with it is just ignored.

Anyway after a lot of searching i found this:

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

And what do you think. It works! Now uid and gid are not ignored (as it should be!). However this is reset on every reboot. And since i could not find an option in my kernel to disable this by default i need to do that everytime i mount….

I think I am not the only one that has this problem. So if this was also your problem you can now upgrade to cifs and get rid of smbfs…..


Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!