Re: [SLUG] Stupid Floppy Tricks

From: Dylan William Hardison (dylanwh@tampabay.rr.com)
Date: Sun Jul 18 2004 - 20:30:52 EDT


Spake Paul M Foster on Sunday, July 18, 2004 at 06:56PM -0400:
> This seems like a really dumb question to me, but for some reason I
> can't figure it out. As a regular user, I want to mount, unmount and
> write to my floppy drive.
>
> The mount and unmount parts work fine with sudo. It's copying files to
> the floppy that present the problem. The floppy (and other devices) are
> mounted at the /media hierarchy. I've set all these directories to
> root.disk ownership, with group write permissions, and I'm in the disk
> group. But when the floppy _mounts_, it has root.root ownership and the
> group write permissions are gone.
>

Looks like you need the "user" option in fstab or to the mount
command. Also possibly you want to use uid=0,gid=$GID_OF_DISC.

For example, my uid on my debian box is 1000, so:
sudo mount -t vfat /dev/fd0 /media/floppy -o uid=1000

% ls -ld /media/floppy
drwxr--r-- 4 dylan root 7168 Dec 31 1969 /media/floppy/

interesting timestamp.

to use gid= and be able to write to it,
do:

% sudo mount -t vfat /dev/fd0 /media/floppy -o gid=1000,umask=004
% ls -ld /media/floppy
drwxrwx-wx 4 root hardison 7168 Dec 31 1969 /media/floppy/

-- 
"I remember when, granpaw use to say, 'Grandson, these be the good
old days."
              -- David "Ziggy" Marley, "Good Old Days" (song)
-
GPG Fingerprint=D67D 2B75 53C6 9769 30E4  D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:35:13 EDT