Red Hat Bugzilla – Bug 850578
forcegid documented in man page but not supported by mount.cifs
Last modified: 2014-06-18 03:42:36 EDT
Description of problem:
The following command fails:
[root@node-02 ~]# /sbin/mount.cifs //smb.server.domain/share/homedir /mnt -o "noperm,mapchars,dir_mode=0750,file_mode=0640,uid=myusername,forceuid,gid=root,forcegid,domain=server.domain,user=myusername"
Password for myusername@//smb.server.domain/share/homedir: ********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
/var/log/messages reports that the "forcegid" option is unknown:
[root@node-02 ~]# grep forcegid /var/log/messages
Aug 21 15:30:40 node-02 kernel: [693888.328908] CIFS: Unknown mount option "forcegid"
The man page indicates that the option should be known:
[root@node-02 ~]# man --pager=cat mount.cifs | grep -B 1 -A 3 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.
If the uid´s and gid´s being used do not match on the client and server, the forceuid and forcegid
options may be helpful. Note however, that there is no corresponding option to override the mode.
Permissions assigned to a file when forceuid or forcegid are in effect may not reflect the the real
The command succeeds if I simply remove the "forcegid" parameter.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I don't personally need this flag. This bug report is just FYI.
This is a kernel bug actually. When the mount option parser was converted to use the standard parsing code, this option got dropped. I have a patch that I'll send upstream after some testing.
Patch has been merged upstream. I'll go ahead and close this with a resolution of UPSTREAM. It should eventually show up in stable kernels too so f17 will get it at that point.