Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

//   /images                cifs    username=blah,password=blah, 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.

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.