-   Linux - Newbie (
-   -   No write permissions on cifs share (

Seb Spiers 03-12-2012 11:01 AM

No write permissions on cifs share
Hi There,

I've got a minimal fedora box with a folder mounted to a windows cifs share.

I mounted the share as root and can access it fine as root and write.

If I try and access the shared folder as another user I can read but I cannot write.

If I try to change the ownership to the other user I get permission denied.

Can anyone advise?

Many Thanks.

lleb 03-12-2012 03:45 PM

post your /etc/fstab

that will help. also did you set visudo to allow your user access to cifs folder. also the user has to have the exact same name on both systems.

ex: on MS Windows computer user name = admin
on the Linux box you will need a user named admin

this will cause much less issues as MS Windows never plays nice with permissions even in an AD pure windows network.

lleb 03-12-2012 04:31 PM

an example for the /etc/fstab:


//IP_address/share        <mount_point>        cifs noauto,guest,rw,username=<user>,password=<pw>        0 0
something like that should be in the fstab, then in visudo you would want:


/bin/mount <mount_point>, /bin/umount <mount_point>
that would be at the end of the user line. remember to have a , and a space between the last entry and the /bin/mount from above.

Seb Spiers 03-13-2012 06:26 AM

Hi There Guys,

I mounted the share using mount from a root shell.

As root I can read/write to the share.
I have another user who cant.

So this suggests that the fact the username is different to the windows logon name doesn't matter.

My /etc/fstab contains

/dev/mapper/vg_ftp-lv_root /                      ext4    defaults        1 1
UUID=f9eee39e-c213-4bd6-9fbf-8340bc7d2c3c /boot                  ext4    defaults        1 2
/dev/mapper/vg_ftp-lv_home /home                  ext4    defaults        1 2
/dev/mapper/vg_ftp-lv_swap swap                    swap    defaults        0 0
tmpfs                  /dev/shm                tmpfs  defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                  /sys                    sysfs  defaults        0 0
proc                    /proc                  proc    defaults        0 0

Should I remount the share as the user who'm I wish to access it?

lleb 03-13-2012 07:22 AM

as you manually mounted the drive, that is why your user can not access the files fully as you desired. again see what i typed above.

Seb Spiers 03-13-2012 09:05 AM

Thanks for you reply,

So I should put

//servername/DNN        /home/wsi/dnn        cifs noauto,guest,rw,username=*****,password=*****        0 0
into my /etc/fstab file?

Many thanks.

Seb Spiers 03-13-2012 09:10 AM

It didn't work :(

lleb 03-13-2012 09:57 AM


Originally Posted by Seb Spiers (Post 4625725)
It didn't work :(

did you edit your visudo?

again remember the user has to be able to mount/umount the share. If the user can not then the user will never have full access to the share for rwx

Seb Spiers 03-13-2012 10:04 AM

what's visudo? ;\

lleb 03-13-2012 10:10 AM

visudo is what controls sudo permissions. this is how user gets to run commands with root level permissions. mount and umount are root commands that user normally does not have access to. by using the visudo you can give permissions to a user they dont own in their group.


# sudoers file.
# This file MUST be edited with the 'visudo' command as root.
# See the sudoers man page for the details on how to write a sudoers file.

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root, rx30      ALL=(ALL) ALL
rx30    ALL =(root) NOPASSWD: /bin/dmesg -n 1, /usr/rx30/, /usr/bin/, /bin/mount -t iso9660 /dev/dvd /mnt/
dvd, /bin/umount /dev/dvd, /usr/bin/, /usr/bin/dvd+rw-format -force /dev/dvd, /bin/mount /dev/dvd /mnt/dvd, /bin/mount -t
iso9660 /dev/cdrom /mnt/cdrom, /bin/umount /mnt/cdrom, /usr/bin/fixprinter
tdsrmtbk ALL=(root) NOPASSWD: /home/tdsrmtbk/, /home/tdsrmtbk/

in the above example i bolded the 2 users in that file for the system I copy/pasted from. In the above example rx30 user has the rights to mount and umount the dvd and cdron as well as to copy some system files around.

All times are GMT -5. The time now is 07:03 PM.