Cannot write to CIFS share as non-root user - CentOS 6

I'm working on a system recently migrated to CentOS 6 from CentOS 4.9. There is a CIFS mount from a Windows 2008 server that existed on the old system. The raw mountpoint has 777 directory permissions.

[root@Bootylicious ~]# ls -ld /images/
drwxrwxrwx 2 root root 4096 Jul 23 22:49 /images/

When the mount is active the permissions are:

[root@Bootylicious ~]# ls -ld /images/
drwxr-xr-x 1 root root 327680 Aug 16 08:45 /images/

Users other than root cannot write to the share or create files. Looking at the old server, the permissions on files and subdirectories within the same share have the setuid bit. This is not present on the new system. The /etc/fstab looks like:

//172.16.30.32/images   /images                cifs    username=blah,password=blah,domain=abc123.net 0 0

What changes occurred between version 4/5 and 6 of CentOS to impact this? This is clearly related to setuid, but I'm not sure what the cleanest fix is.


This was resolved with the tip at: CIFS mounted drive setting "stick-bit" on all files, cannot change permissions or modify files

I had to change /etc/fstab and add the file_mode=0666,dir_mode=0777 mount options. I can also force the UID and GID of the file owners. I'm just wondering why this changed between CentOS/Red Hat versions.


I solved, in my case, using noperm option in fstab entry


I had the same problem with wordpress wp-content and an autoversioning system. the two folders where on a cifs mount on CentOS 6.3, that obviously worked flawlessly on centos 5.8.

I had already the sticky bits configured in the mount options of the two shares, the trick for me was to add (rather casually I have to admit) the option noserverino

//sharesrv/dir1/dir2/dir3/ /mnt_dir cifs credentials=/etc/samba/.credential2,dir_mode=0777,file_mode=0777,noserverino 0 0

I'had unmounted and remounted and the autoversioning now works!

I hope will help you.