Bug 9219 - mount.cifs doesn't recognize 'forcegid' mountoption
mount.cifs doesn't recognize 'forcegid' mountoption
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
x64 Linux
: P5 normal
: ---
Assigned To: Jeff Layton
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 12:45 UTC by Marc 'Judge' Richter
Modified: 2012-10-12 12:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc 'Judge' Richter 2012-09-27 12:45:44 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:
"""
OPTIONS
...
       forcegid
           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
           information.
...
"""

When you issue mount.cifs without 'forcegid', it succeedes (even with 'forceuid' in place).
Comment 1 Jeff Layton 2012-10-12 10:48:05 UTC
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...
Comment 2 Marc 'Judge' Richter 2012-10-12 12:36:44 UTC
(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.
Comment 3 Jeff Layton 2012-10-12 12:55:52 UTC
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.