[ale] permission confusion

Michael D. Hirsch mhirsch at nubridges.com
Mon Aug 16 16:55:09 EDT 2004


On Sunday 15 August 2004 03:37 pm, Sean Kilpatrick wrote:
> Has anyone ever seen permissions/ownership change depending
> on what "drive" is mounted?
>
> Consider the lines from a command session listed below.
>
> It will make more sense if you understand that I have
> a pen drive/thumb drive/USB widget (whatever you want
> to call it) that is attached by the OS either to
> /dev/sda1 or to /dev/sdb1.  In either case I mount it to
> /mnt/widget/.
>
> First I plug in the device, mount it and then check the
> ownership/permissions in /mnt. Then I unmount the device
> and run "ls -l" on /mnt again. Note how the ownership of
> /mnt/widget changes.

When you run ls the second time, the device is not mounted at all.  The fact 
that there is content in /mnt/widget means that you must have some files in 
there with some permissions.  

When you mount the device, the original files get hidden and only the files on 
the device show up.

You seem to have directories of the same name on you realy file system and 
your thumbdrive.  I would guess that when you were still figuring out how to 
mount and use your thumbdrive you mistakely copied some files to /mnt/widget 
while it wasn't mount.

Umount the drive, then delete everything under /mnt/widget.

Michael

> Does anyone have _any_ idea what is going on here? I'd really
> like to be able to use the GUI to copy files to this device
> without having to bring up a root shell and use the command
> line. But as long as the "mounted" device is owned by root,
> this is not possible.
>
> ----------------- <begin copied data> --------------------------
>
> [root at localhost mnt]# mount /dev/sda1 /mnt/widget
> [root at localhost mnt]# ls -l
> total 88
> drwxr-xr-x    2 kilpat   users        4096 Aug 14 21:04 foo
> drwxr-xr-x    4 root     root        16384 Dec 31  1969 widget
> drwxr-xr-x    2 kilpat   users        4096 Sep 22  2003 zip
>
> [root at localhost mnt]# umount /dev/sda1
> [root at localhost mnt]# ls -l
> total 76
> drwxr-xr-x    2 kilpat   users        4096 Aug 14 21:04 foo
> drwxrwxrwx    2 kilpat   users        4096 Aug 14 20:10 widget
> drwxr-xr-x    2 kilpat   users        4096 Sep 22  2003 zip
>
> (rest of the /mnt directory deleted for brevity.)
> ---------------- <end copied data> ------------------------------
>
>
> I also note that the line "total 88" changes to "total 76"
> but I have no idea what information that line is giving me.
>
> Sean
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list