Upgraded system last night, and could no longer mount cifs shares as a non-root user. Trying to mount without changing setuid on mount.cifs gives the expected error,"This program is not installed setuid root - "user" CIFS mounts not supported". Setting the setuid bit on mount.cifs, however, does not fix the problem. Mount attempts as non-root user gives this error: Unable to set current process capabilities: Operation not permitted error 2 (No such file or directory) opening credential file /somedir/smbpwds The second line of this error is bougs, as there most certainly is a /somedir/smbpwds file. Running as root, the share mounts as expected. As a temporary work-around, I downgraded my cifs-utils to 5.4, and it is working again. My /etc/fstab entry: //10.199.199.199/gman /home/gman/win7 cifs user,_netdev,noperm,uid=gman,noauto,user=gman,dir_mode=0700,file_mode=0700,credentials=/somedir/smbpwds,rsize=130048,wsize=57344 1 2
I also got the error message about "user" CIFS mounts not supported, but the command # chmod u+s /sbin/mount.cifs fixed the problem for me. # ls -lah /sbin/mount.cifs -rwsr-xr-x 1 root root 39K 22. Jul 17:23 /sbin/mount.cifs # emerge -pqv cifs-utils [ebuild R ] net-fs/cifs-utils-6.4 USE="acl ads caps caps-ng -creds"
Hi guys. Setuid was dropped from ebuild for security reasons, check CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586. However you can chmod u+s /sbin/mount.cifs anytime.