Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-27-2005, 02:18 PM   #1
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, 05:06 PM   #2
Registered: Nov 2004
Distribution: KDE Neon User edition; Kubuntu; OpenSUSE Leap
Posts: 292

Rep: Reputation: 31
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, 11:35 PM   #3
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?

Old 02-28-2005, 12:59 AM   #4
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

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

#chown /mnt/mymountpoint
# chmod 770 /mnt/mymountpoint



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

All times are GMT -5. The time now is 07:54 PM.

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