LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Mounting CIFS with write permissions (https://www.linuxquestions.org/questions/slackware-14/mounting-cifs-with-write-permissions-693465/)

alkos333 12-28-2008 11:19 AM

Mounting CIFS with write permissions
 
Code:

root@tpt60:~# umask
0022
root@tpt60:~# mount -t cifs //192.168.1.100/SharedDocs /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=//192.168.1.100\SharedDocs,ip=192.168.1.100,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:
Quote:

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

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

username=user
password=passwd
The ids & masks are automagically the same on the client as on the server.
Regards,
Bill

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

http://lists.samba.org/archive/linux...er/001590.html

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:
username=mrodri
password=_password_
domain=_NTdomain_
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 03:52 PM.