LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 03-27-2012, 05:02 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
mounting windows share is assigned to root


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
What did I do wrong?
 
Old 03-27-2012, 05:04 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Add
Code:
mode=1777
to your mount options, that should do the job.
 
Old 03-28-2012, 12:13 AM   #3
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
Super! thanks! Would I do the same thing in fstab if I wanted it to be permanent?
 
Old 03-28-2012, 06:25 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.

Last edited by TobiSGD; 03-28-2012 at 06:26 AM.
 
Old 03-28-2012, 02:18 PM   #5
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
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!
 
Old 03-28-2012, 02:20 PM   #6
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
would it look like this?
Code:
sudo mount -t smbfs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user,mode=1777
 
Old 03-29-2012, 07:14 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Exactly.
 
1 members found this post helpful.
Old 04-09-2012, 03:59 PM   #8
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
Alas, that did not work. ls still shows it's owned by root and requires root privileges to write to them. Suggestions?
 
Old 04-09-2012, 04:06 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.

Last edited by TobiSGD; 04-09-2012 at 04:07 PM.
 
Old 04-11-2012, 02:40 PM   #10
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
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
 
Old 04-11-2012, 03:40 PM   #11
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
http://www.cyberciti.biz/faq/linux-m...windows-share/


hope that helps.
 
Old 04-11-2012, 04:49 PM   #12
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
ty but I've seen that page and it wasn't any help.
 
Old 04-11-2012, 04:55 PM   #13
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
SOLVED! noperm, mode, and GID did the trick. replace xxxx with the GID of the group you want it to belong to.
fstab
Code:
//WINSERVER3/Runs   /runs 	smbfs   iocharset=utf8,credentials=/root/.smbcredentials,dir_mode=0775,gid=xxxx,noperm       0       0

CLI (use sudo for debian/ubuntu)
Code:
sudo mount -t smbfs //WINSERVER3/Runs /runs -o pass=abcdefg,user=user,dir_mode=0775,gid=xxxx,noperm
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting Windows share with a space in the share name Suncoast Linux - Networking 1 06-19-2009 10:15 AM
Mounting Windows SHARE on Freebsd. paragkalra *BSD 2 08-12-2008 12:53 AM
Mounting Windows share leupi Linux - Server 10 04-12-2008 08:36 AM
samba mounting windows share gunnix Linux - Software 6 06-25-2006 06:47 PM
Trouble mounting a Windows share lowpro2k3 Slackware 2 10-17-2005 04:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration