The Samba-Bugzilla – Bug 9219
mount.cifs doesn't recognize 'forcegid' mountoption
Last modified: 2012-10-12 12:55:52 UTC
When you issue 'mount.cifs' like this:
mount.cifs -o credentials=/etc/samba/fstab_credentials,rw,uid=81,gid=9005,forceuid,forcegid //ha-nas-int.web-factory.de/www_apache /server/data/www/apache_smb
You get 'mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)'.
In the manpage of mount.cifs you can find:
instructs the client to ignore any gid provided by the server for files and directories and to always assign the owner to be the value of the gid= option. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more
When you issue mount.cifs without 'forcegid', it succeedes (even with 'forceuid' in place).
This was a kernel bug, actually and should now be fixed in mainline. The fix is also coming soon to a stable kernel near you...
(In reply to comment #1)
> This was a kernel bug, actually and should now be fixed in mainline. The fix is
> also coming soon to a stable kernel near you...
Is there a upstream - version known about when this will hit the kernel? I'd like to test if that release really solves the problem.
Current mainline has it, so it should be in 3.7. I've also gotten emails from Greg KH about it being added to 3.4, 3.5 and 3.6 stable kernels. I assume the next versions of each one of those that ship will get it, but I don't know what those version numbers will be.