LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-31-2003, 03:09 AM   #1
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Rep: Reputation: 15
Restrict Mounted Disc Access


Is there a way to prevent non-root users on seeing, gaining access, mounting, editing, and deleting the contents of a mounted hard drive (hdb) while maintaining the automount capabilities that I currently have when logging in as root?

hdb is also formatted as vfat btw.
 
Old 08-31-2003, 06:05 AM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
I think you are looking for the umask option. For more details check the manpage of mount. A small example from my /etc/fstab:

/dev/fd0 /floppy auto ro,nodev,nosuid,noexec,umask=137 0 2
 
Old 09-01-2003, 12:51 AM   #3
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
What number should I place in umask=000? I read the man but I can't understand what I should use.
 
Old 09-01-2003, 11:29 AM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
markus1982 gave you the answer => umask=137
For example:
Code:
mount -t vfat -o defaults,umask=137 /dev/hda1 /mnt/windows98
 
Old 09-01-2003, 12:58 PM   #5
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
With umask you have to think the other way round. umask=777 means NOBODY (except root of course) has access. umask=000 means everybody has FULL access.... man umask for more details.
 
Old 09-03-2003, 01:43 AM   #6
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
/dev/hdb6 /mnt/hdb6 vfat umask=000,auto,users,rw 0 0

mine is like above but when I select umask=777, I also can't access it.
 
Old 09-03-2003, 10:34 PM   #7
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
bump
 
Old 09-06-2003, 06:48 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
mine is like above but when I select umask=777, I also can't access it.
Please reread the thread carefully, the answer is there.
Like markus already said, 777 NOBODY is granted access. Try the other value.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restrict X server access using /etc/security/access.conf anand_kt Linux - General 0 04-22-2005 08:40 AM
restrict net access anubhuti_k Linux - Networking 3 02-15-2005 04:09 PM
Disc not mounted at boot aeruzcar Linux - Hardware 6 05-03-2004 10:14 PM
Restrict access by IP waifurchin Linux - Security 3 02-02-2003 07:54 AM
restrict file access loocw General 0 03-07-2001 12:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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