Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-09-2009, 04:07 PM
|
#1
|
Member
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54
Rep:
|
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? :/
|
|
|
07-09-2009, 10:39 PM
|
#2
|
Member
Registered: Mar 2004
Distribution: debian testing/unstable, devuan, raspberrypi OS
Posts: 68
Rep:
|
HI,
Have you tried using umask=000 or users in the mount command?
|
|
|
07-11-2009, 09:58 PM
|
#3
|
Member
Registered: Jun 2007
Location: São Paulo - Brazil
Distribution: Linux Mint
Posts: 54
Original Poster
Rep:
|
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
|
|
|
12-13-2009, 03:30 PM
|
#4
|
Member
Registered: Jan 2009
Posts: 32
Rep:
|
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.........
|
|
|
07-04-2012, 07:59 AM
|
#5
|
LQ Newbie
Registered: Jul 2012
Posts: 1
Rep:
|
For me, it worked with parameter uid=%username%.
|
|
|
01-28-2014, 01:33 PM
|
#6
|
LQ Newbie
Registered: Apr 2009
Location: Flower Mound, TX
Posts: 2
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|