[SOLVED] mounting windows share is assigned to root
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
so, I'm trying to mount a windows share on ubuntu 10.04 and only those with sudo access can write to it. I'd like for everyone to be able to write to it. I used this to mount it.
Code:
sudo mount -t smbfs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user
Yes. Keep in mind that this will allow every user on that machine to do everything on that share. If you want to restrict access to a particular user also have a look at the uid and gid options.
that's exactly what I wanted. There are only 6 people using this machine and they all need to be able to r/w to the share. I will be looking into the GID/UID options for a different share though. THANK YOU!
Have you tried the uid and gid options? By the way, i don't know if that is really different, but instead of -t smbfs I use -t cifs to mount Samba shares.
so, I've tried these two and no difference. I created a group called "windows" and used the GID from that. Still won't let you write to the drive unless you're root.
Code:
sudo mount -t cifs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user,dir_mode=0775,gid=1009
sudo mount -t smbfs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user,dir_mode=0775,gid=1009
I also tried
Code:
mount -t smbfs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user,dir_mode=0777,gid=1009
with the first two ls shows
Code:
drwxrwxr-x 1 root windows 80K 2012-04-11 14:49 xdrive
with the mode 777 it shows
Code:
drwxrwxrwx 1 root windows 80K 2012-04-11 14:51 xdrive
It looks like it's mounting right but why can't I write to it without root permissions?
Last edited by daisychick; 04-11-2012 at 02:55 PM.
Reason: additional info
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.