[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vfat drives and users



On Tue, 27 May 1997, Brian Skreeg wrote:
> 
> I`ve recently installed *yet* another hardrive in a bid for more room.
> The drive has been formatted as fat16 for use by Win95 as well. Now I`ve
> decided to ask about a problem I`ve ignored until now. Both the new drive
> and my present Win95 drive are mounted in fstab using vfat at mountpoints
> /DOS and /AMIGA (don`t ask why , it`s too painful to talk about). Currently
> only root can write to these drives. I`d like to make it so my usual
> account "oz" can write to these as well. How?
> 

I have solved this by creating a group for each filesystem that don't
support access permissions. E.g I have a group "fat" with gid=23 for
fat disks. Then each user that should have write access to the disk
must be a member of that group. That you do be adding the line
fat::23:oz
to your /etc/group (see also manpage for adduser).

Then in your /etc/fstab you should use gid=23 and umask=002, this
means no matter who mounts the filesystem (probably root during boot)
all the files and dirs will have group 23 (fat). The umask option tells
the system to make no restrictions for owner and group (in which oz is
a member), that is all the files and dirs will get access permission
rwx for owner and group and rx for others.

The line in your /etc/fstab would look something like this:
/dev/hdxx /DOS   vfat    defaults,gid=23,umask=022,quiet     1      2

If you don't use the quiet option you will get an error message each
time you try to change the access permissions (done e.g. during moving
with mv)

Hopes this helps, it solved all my problems, and is a solution
that supports that some users have write permissions and others not.
(The ones that are members of fat have)

/fax
--
+- Fredrik Ax -+------ Snailmail ------+- Where to reach me on the net -+
|    \\|//     | Kämnärsvägen 13 E:202 | E-mail: fax@df.lth.se          |
|     @ @      | S-226 46 LUND, SWEDEN | WWW: http://www.df.lth.se/~fax |
+-oOO-(_)-OOo--+-----------------------+--------------------------------+


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble?  e-mail to templin@bucknell.edu .


Reply to: