Opensuse 11.4 CIFS rights issue

Q: How do I mount a CIFS share so that my user stevej has all rights to it?


I can mount the share as root.
mount.cifs //10.x.x.x/Data /home/stevej/Synology/Data/ --verbose -o user=stevej

Using Dolphin in Super-User mode, I can copy files and directories from the share to itself with no errors.

Using Dolphin in Normal-user mode. I get the failure “Could not change permissions for…”. The file is copied, but its owner,timestamp and permissions are wrong. If a subdirectory is involved, the copy aborts.

Using Windows XP I can copy files and directories from the share to itself with no errors.


If I mount with uid and gid, then my normal user can not access the share.
mount.cifs //10.x.x.x/Data /home/stevej/Synology/Data/ --verbose -o user=stevej uid=stevej gid=users

Disabling Apparmour didn’t help.
/usr/sbin/rccifs status shows it running
smb is not running as I am not providing a share.
nmb is not running

Network Info:

Synology DS211 - There are 2 users on it. One of which is stevej and the other is julie. Rights RWX are applied to the users and the group called users. All files have stevej as the owner and users as the group with RWX
Opensuse 11.4 - There are 2 pc’s. One is run as stevej. The other pc runs as julie
Windows 2000 - Runs as stevej and maps to the share as stevej. Works as expected
Windows XP - Runs as julie and maps the the share as julie. Works as expected
Ultimately, I want the shares to automount at boot, or login and give the user full access.

I have been to Swerdna’s page and done as much as I can, but still no luck.

Thanks for the help


It works if I use this mount command.

mount.cifs -o user=stevej,password=xxx,rw,nounix,uid=stevej,gid=users,file_mode=0777,dir_mode=0777,forceuid,forcegid,nosetuids //10.x.x.x/Data /home/stevej/Synology/Data

I realize that 777 is a little too open, but I was just so happy to finally get it working, that I thought I would share.

Thanks for sharing that!

How would you write the entry in fstab to mount at boot?



Read this nice guide by swerdna:

Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 11 plus FAQs


Try this in your /etc/fstab file
//10.x.x.x/Data /home/stevej/Synology/Data cifs user=stevej,password=xxx,rw,nounix,uid=stevej,gid=users,file_mode=0777,dir_mode=0777,forceuid,forcegid,nosetuids,_netdev 0 0

Remember to alter the line to your environment.
If it is currently mounted, unmount it with the command
umount /home/stevej/Synology/Data

Then test your fstab entry with the command
mount -a

All of these commands are run as the user root.

Good luck