LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-27-2005, 01:18 PM   #1
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Rep: Reputation: 15
mount options?


I'm trying to change my /etc/fstab so only users of a certain group can mount and unmount some devices. I know about the options 'user'(s) and 'owner', but is there a way to limit mount permissions to a certian group?

Thank you.
 
Old 02-27-2005, 04:06 PM   #2
APB_4
Member
 
Registered: Nov 2004
Location: England
Distribution: Ubuntu 9.04; Crunchee; EEE Xandros
Posts: 289

Rep: Reputation: 30
Ok here goes. Set the option to user in the fstab. Make a group for the people you want to be able to access the device like this:
"groupadd name_of_group" in a terminal.
Add the users you want to be able to access the device like this
"usermod -g name_of_group user"
Now in a terminal su to root then type "visudo". If you have never used this before here's what you need to do.
Press "a" and go down to a new line.
Type this in:
"%name_of_your_group ALL=NOPASSWD: /sbin/mount /the/device,/sbin/umount /the/device"
now press esc and type ":wq" to save and exit. That is if you want the people to be able to mount and umount with no password.
 
Old 02-27-2005, 10:35 PM   #3
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Original Poster
Rep: Reputation: 15
Thanks. I already had my group set up (using the addgroup and adduser commands). Surprisingly, visudo opened the file in the text editor I usually use. I don't remember setting it as a default anywhere...

I guess I forgot to ask this, but once it's mounted, how can I make it so only the members of that group have read-write access to the filesystem and others can't access it?

Thanks.
 
Old 02-27-2005, 11:59 PM   #4
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 588

Rep: Reputation: 45
You simply have to give suitable permissions to the file system. Something like

Code:
#chown root.group /mnt/mymountpoint
# chmod 770 /mnt/mymountpoint
Best,

Ott
 
  


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
insert options to usb hotplug mount Yuan Linux - Laptop and Netbook 0 10-20-2005 12:41 AM
vfat mount options (perm masks) shakezilla Slackware 7 09-22-2005 04:57 AM
No options to mount USB Router/Cable Remote DamnSmallLinux 1 03-30-2005 09:01 AM
what are other mount options for vcd for /mnt/cdrom? sirpelidor Linux - General 4 12-04-2003 03:25 PM
how to change mount options for boot partition? jimveta Linux - General 2 10-08-2003 02:53 AM


All times are GMT -5. The time now is 01:30 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