LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2003, 05:25 AM   #1
bennett
LQ Newbie
 
Registered: Oct 2003
Location: Tucson, Arizona
Posts: 4

Rep: Reputation: 0
Post filesystem permission problem


Hi

My redhat 9 mount my vfat hd at the boot time. But, I don't want other user see that hd or access to that driver except root or specific user.

I read the fstab man page. I couldn't find any info about that. Is there any one who can give me a hint or show me answer?

Thanx in advance.
 
Old 10-08-2003, 09:53 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,035

Rep: Reputation: Disabled
Re: filesystem permission problem

Quote:
Originally posted by bennett
... I read the fstab man page. I couldn't find any info about that.
Read again .

If you look at your /etc/fstab you will perhaps note some entry like

/dev/hdax /your/directory vfat rw,users 0 0

or some such. Now, users is (one of) the groups (of user types) -- for example root is another group or perhaps video or what ever.

The command groups shows to what groups you already belong.

newgrp <new group here> creates a new group. Create one with a name to your liking and change the line in /etc/fstab from the above "users" to "your new group name" (without the "'s).

Then you have to give the lucky few permission by adding them th the new group. And here I am not sure I think it is done with

addgrp <lucky user> your new group name

After rebooting this should work.

Also man groups / newgrp / addgrp.
 
Old 10-08-2003, 10:02 AM   #3
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
You can specify the permissions for a vfat filesystem in fstab using the 'umask=<#>' option. If you wanted to give root and the group the drive belong's to rwx permissions, you can out 'umask=770' That way, users who are not in the right group won't be able to access it.
 
Old 10-08-2003, 03:28 PM   #4
bennett
LQ Newbie
 
Registered: Oct 2003
Location: Tucson, Arizona
Posts: 4

Original Poster
Rep: Reputation: 0
Talking

Hi ... thanx to the two experts above.

I slove my problem. This is how I slove it.
Redhat 9 mount my vfat hd by default( 755 ).

First, I add root to mygroup(gid=500). Then edit fstab like this:

/dev/hda7 /data vfat gid=500 0 0

This setting sets my vfat hd group as 500. But other user still can enter that /data folder since defualt is 755. So, I add umask

/dev/hda7 /data vfat gid=500,umask=007 0 0

I had test this setting, it works fine.
If the setting is unsecure, please let me know.

Thanx you guys help.

Bennett
 
  


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
filesystem problem adityabhat2 Linux - Software 7 06-07-2005 04:36 PM
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 10:35 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Filesystem problem Daxziz Linux - Software 3 03-07-2004 12:46 PM
problem with filesystem atkromo Linux - General 1 07-16-2003 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration