Jump to content
xisto Community
Sign in to follow this  
jedipi

Why Do Normal Cannot Use Fat32 Volumn please, here is my fstab file

Recommended Posts

The following is my fstab./dev/hda1 and /dev/hda5 is fat32 format.root can use after login, but nor the normal users.why?and how can I allow normal users to read the files inside fat32??# /etc/fstab: static file system information.## <file system> <mount point> <type> <options> <dump> <pass>proc /proc proc defaults 0 0/dev/hda6 / reiserfs notail 0 1/dev/hda7 none swap sw 0 0/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0/dev/hda1 /mnt/winc vfat rw,user,auto 0 0/dev/hda5 /mnt/wind vfat rw,user,auto 0 0/dev/sda1 /mnt/usb auto rw,user,auto 0 0

Share this post


Link to post
Share on other sites

Hi...

 

You can allow access to all by adding:

/dev/hda1 /mnt/winc vfat rw,user,auto,umask=000 0 0
but your security would be weak, since all would have access to this drive...

 

so better is to make a group that would have access to it, and lock access to all others:

 

1) create new group, called for example vfatusers:

groupadd vfatusers
2) add your users to this group, edit file /etc/group under vfatusers so it would have users divided by "," at endo of it, note that number 104 can (and probably would) be different:
vfatusers:x:104:user1,user2,user3
3) change group of your vfat directories to vfatuser, also make sure that root is owner of those files:
chown root:vfatusers /mnt/winc /mnt/wind
4) in fstab allow group to access it, edit it to look like this:
/dev/hda1 /mnt/winc vfat rw,user,auto,umask=007 0 0
I think that this would be enough, same way you can use to allow some users to access some directories, and other not... remember to give access to fstab and group only to root, so users wouldn't be able to change what you set...

 

Probably there is other way, but I always do it like that... hope this helped...

Share this post


Link to post
Share on other sites

Thank you, mate..you are very helpful..Just want to know, what is the different between umask=000 and umask=007

Share this post


Link to post
Share on other sites

so let me explain :P

 

rights to files are writen in three octagonal numbers (from 0 to 7):

 

first one, gives info about owner,

second about group

and third about all others.

 

Also every number is taken from three other walues that you sum up - it is:

 

1=executable,

2=writable and

4=readable,

 

when you sum them up, you can get for example:

 

6=write+execute.

 

So permision to file that looks like this:

 

711 would mean: owner can do anything wile group and others can only execute.

 

It is usefull for scripts that cannot harm system, and are usualy called by normal users. So when you want to change permision, just

 

chmod permision file

 

and everything would work... but when you are using fstab all file permisions are masked with umask, so:

 

umask=000 would mean give all to everybody

umask=007 would mean give all to owner (root) and group (vfatusers), but don't give it to any others

 

this is some basics from security in Linux. It is hard for fist few days/weeks/months, but you would get used to it. I would mention also command

 

umask permision

 

that would umask all new files created by user that called it with specific permision.

 

Hope that answer suits you, and everything is clear now, if not, just ask :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.