Jump to content

Hard drive permissions


x-tech
 Share

Recommended Posts

:headbang: I just installed mandrake and Im trying to get access to the other drives on my system.

I have modified my fstab file to the following.

 

/dev/hdb1 /home/xxx/drive2 vfat defaults,user 0 0

 

However when I try to access the drive It wont let me in?

What Am I doing wrong. :evilmod:

 

Also is there any reference on the net that explanes the fstab in detail with examples.

 

Thanks :banana:

Link to comment
Share on other sites

There are basicly three ways to handle permissions. this is e.g. a way to do it with a vfat windows partition:

 

1) remount per user:

in /etc/fstab change the entry for that dos partition like this:

 

/dev/hda1 /mnt/partition1 vfat defaults,user 0 2

 

this will allow any user on your system to unmount that dos partition

and to remount it. Remounting it will allow that user to write to it,

but not to other persons. bad thing: others could remount it too,

putting the first user again in a situation where he can't write to it!

 

2) mount by root, but for a specific user:

in /etc/fstab change the entry for that dos partition like this:

 

/dev/hda1 /mnt/partition1 vfat defaults,uid=1001,gid=1001,noexec,nosuid,nodev 0 2

 

this will allow root but also the user with uid 1001 and gid 1001

to read and write to that partition. Only root can mount it.

 

3) mount by root, but with very permissive file permissions:

in /etc/fstab change the entry for that dos partition like this:

 

/dev/hda1 /mnt/partition1 vfat defaults,umask=000,noexec,nosuid,nodev 0 2

 

this allows any user to read and/or write to this partition, but only root

can mount it.

 

4) combine version 2 and 3:

in /etc/fstab change the entry for that dos partition like this:

 

/dev/hda1 /mnt/partition1 vfat defaults,gid=1500,umask=002,noexec,nosuid,nodev 0 2

 

this will allow root and any user with gid 1500 to write to it. every

body can read from it, but only root can mount it.

 

if you want to mount something different than vfat (windows file system), simply change the vfat entry to e.g. ext3, reiserfs or whatever fileformat you are using on the respective partition.

in most cases, version 3 is the normal way to handle this.

 

good luck. :thumbs:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...