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 trying to reconfigure Samba/CIFS on a CentOS client machine specifically because the current setup requires any users logged into the machine to sudo writes to the samba share. I want to take away the sudo privileges while still providing a means to write to the share.

I'm inclined to think that no changes need to be made on the server end, as I have a newly configured Debian client that works (almost) perfectly. I say almost because it throws me warnings like mv: failed to preserve ownership for `/media/smbshare/somefile.xls': Permission denied. (If I could make this go away, that would of course be a bonus.)

Just to provide some more background, I've used the following guides on both Debian and Ubuntu with success:

I tried to take similar steps on the CentOS machine: I first created a group 'samba' and, using 'sudo visudo' added the following line:

%samba  ALL=(ALL)       /sbin/mount,/sbin/umount,/sbin/mount.cifs,/sbin/umount.cifs

(I've experimented with both /sbin/mount and /bin/mount)

I then added myself to the group, unmounted and remounted, tried to write again, no luck.

Next: I made some edits to the fstab file. The old line read:

//            /mnt/smbshare     cifs    credentials=/root/smbcreds      0 0

I've played around with different configurations, adding gid=samba, file_mode=0777, dir_mode=0777, noserverio, in different combinations, unmount and remount and no apparent difference.

Perhaps then a problem with the UNIX style permissions on the client? As follows:

drwxrwxrwx 101 nobody nobody    0 Jun  7 05:04 smbshare

But it appears that read/write/execute is granted to all?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.