LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-09-2009, 03:07 PM   #1
icmp_request
Member
 
Registered: Jun 2007
Location: 127.0.0.1
Distribution: Changing a lot over time
Posts: 46

Rep: Reputation: 15
Mounting cifs with read/write permissions for a non-root user


Hello guys! First, I've posted it on "Linux - Newbie" Forum but as I've later figured out that it's not a so "newbie" question I've asked for the forum admins to lock that thread and continue on this one, which seems to be the proper forum to post this problem:

I wish to mount a cifs folder and I wish to give the user id 1701 read AND write permission. I've already tried adding "user" on fstab but when I try to mount the mount command cannot be run by a user. I tried as root anyway and gave the following command:

mount -t cifs //192.168.0.2/Share /mnt/share/ -o iocharset=utf8,uid=1701,gid=1701,rw

The problem is, it only mounts the folder with r-x permissions so I don't have +w on any of its files. See below:

root@voyager:/mnt# ls -n
total 8
drwxr-xr-x 2 0 0 4096 2009-07-08 19:14 cifs-1
drwxr-xr-x 2 0 0 4096 2009-07-08 19:14 cifs-2
dr-xr-xr-x 1 1701 1701 0 2009-07-08 18:52 share

I've already tried chmod the folder to 1777 but no success... any ideas? :/
 
Old 07-09-2009, 09:39 PM   #2
titetanium
Member
 
Registered: Mar 2004
Distribution: debian testing/unstable
Posts: 68

Rep: Reputation: 16
HI,

Have you tried using umask=000 or users in the mount command?
 
Old 07-11-2009, 08:58 PM   #3
icmp_request
Member
 
Registered: Jun 2007
Location: 127.0.0.1
Distribution: Changing a lot over time
Posts: 46

Original Poster
Rep: Reputation: 15
Yes I've tried:

root@voyager:/# mount -t cifs //192.168.0.2/Share /mnt/home-share/ -o iocharset=utf8,uid=1701,gid=1701,rw,users,umask=000

root@voyager:/# ls -n /mnt
total 8
drwxr-xr-x 2 0 0 4096 2009-07-08 19:14 cifs-1
drwxr-xr-x 2 0 0 4096 2009-07-08 19:14 cifs-2
dr-xr-xr-x 1 1701 1701 0 2009-07-11 19:13 home-share
 
Old 12-13-2009, 02:30 PM   #4
RichardUK
Member
 
Registered: Jan 2009
Posts: 32

Rep: Reputation: 16
Hi, I have the same issue. I want to mount the folder for my mail client so that if my system goes pop my mail is safe on the server. As it's for the mail client it needs read write access. If I browse to the samba share I have the correct access rights. But when I mount it as a folder no joy, read only. (

Come back smbfs, all is for given.........
 
Old 07-04-2012, 06:59 AM   #5
paratrooper
LQ Newbie
 
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
For me, it worked with parameter uid=%username%.
 
Old 01-28-2014, 12:33 PM   #6
rksii
LQ Newbie
 
Registered: Apr 2009
Location: Flower Mound, TX
Posts: 2

Rep: Reputation: 0
Just found this solution on an OpenSUSE board and it worked for me:

Code:
//yourserver/share /mnt/share cifs username=username,password=password,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting CIFS with write permissions alkos333 Slackware 5 03-02-2012 12:16 PM
Mounting cifs with read/write permissions for a non-root user icmp_request Linux - Newbie 5 07-09-2009 08:16 PM
Granting full read/write permissions to all files for a specific user laserjim Linux - Security 10 01-31-2009 11:17 AM
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM
NFS share not mounting with read/write permissions syphoncode.32 Linux - Software 1 06-15-2007 02:46 AM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration