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

Re: floppy permissions



On Tue, Apr 17, 2001 at 11:06:33AM -0700, JC Portlock wrote:
> Hello all.
> 
> New subscriber to the list and have the following situation.
> 
> Running a potato box.
> 
> I wanted to save a document created in StarOffice to /mnt/floppy/ but it told 
> me I didn't have the right perms.  As user, I am already added to the group 
> 'floppy'.  So I checked the perms and found I didn't have write privs.  Went 
> to chmod to correct the situation and had these results:
> 
> YOU ARE ROOT!! on jchammin
> /mnt pts/4> chmod 777 floppy
> YOU ARE ROOT!! on jchammin
> /mnt pts/4> ls -al
> total 17
> drwxr-xr-x    4 root     root         1024 Jan 15 21:45 ./
> drwxr-xr-x   20 root     root         1024 Jan 20 11:01 ../
> drwxr-xr-x    3 root     root         7168 Dec 31  1969 floppy/
> drwxrwxrwx   60 root     root         8192 Dec 31  1969 windoz/

i don't understand why the chmod made `windoz' world writable instead
of floppy...  unless it already was and your point is that chmod is
not working on floppy.

is a msdos filesystem mounted on floppy/  ? if so that is why.  msdos
does not have any concept of file permissions, you cannot change the
faked ones the kernel enforces with chmod.

instead you need to do:

mount -t msdos -o uid=1000,noexec /dev/fd0 /floppy

which will cause all files on the msdos filesystem to be owned by uid
1000 (most likely you, do a `getent passwd yourusername' to see what
your uid is)

note that changing permissions on the mountpoint directory when
nothing is mounted does nothing but open security holes.  permissions
on the mountpoint have no effect on any filesystem mounted on top.  

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpOfiCIIvMxV.pgp
Description: PGP signature


Reply to: