-   Slackware (
-   -   Mounting CIFS with write permissions (

alkos333 12-28-2008 11:19 AM

Mounting CIFS with write permissions

root@tpt60:~# umask
root@tpt60:~# mount -t cifs // /mnt/cifs --verbose -o guest,user=me,uid=me,gid=users,rw
parsing options: rw,guest,user=me,uid=1000,gid=100

mount.cifs kernel mount options unc=//\SharedDocs,ip=,ver=1,rw,guest,user=me,uid=1000,gid=100
root@tpt60:~# ls -ld /mnt/cifs
dr-xr-xr-x 1 me users 0 2008-12-26 12:07 /mnt/cifs/

Why aren't there write permissions for /mnt/cifs ? I can't write to the share with a regular user "me"

TSquaredF 12-28-2008 01:31 PM

Is your share mounted rw on the server? I'm using "user" security in my smb.conf. Here is the way I mount on the server:

/dev/hdb1 /mnt/hal ntfs-3g auto,uid=1000,gid=100,dmask=007,fmask=117
Then on the client (in /etc/fstab):

//server/hal /mnt/hal cifs auto,credentials=/home/user/.creds,nobrl
My credentials file is:

The ids & masks are automagically the same on the client as on the server.

alkos333 12-28-2008 11:29 PM

This is a windows XP share though.

slack1992man 12-29-2008 07:56 AM

This fixed it for me when using autofs

alkos333 12-30-2008 03:46 PM

I tried disabling the Unix Extensions, but that didn't help. It still doesn't show write permissions after I re-mount the windows share.

This worked fine prior to 12.2 upgrade.

NinjaVZ 03-02-2012 12:16 PM

mount.cifs with write access
To get the write access for the user who will be using the mount you need to assign the uid and gid options when creating the mount (example):

mount.cifs //server/share /home/mrodri/mountpoint -o rw,credentials=/home/mrodri/.creds,gid=502,uid=502

//server/share is the servername and share that you want to connect to
/home/mrodri/mountpoint is the mountpoint at folder mountpoint of user mrodri
credentials point to a hidden file .creds of a format like:
uid and gid are the user id and group id assigned by linux to the mrodri user. Check those with your user administration program, centos 6, system-administration-users and groups

this worked for me.

All times are GMT -5. The time now is 12:50 AM.