Re: odd behaviour with CDs on 2.1.120pre3

Richard B. Johnson (root@chaos.analogic.com)
Wed, 2 Sep 1998 15:52:22 -0400 (EDT)


On Wed, 2 Sep 1998, Theo Van Dinter wrote:

> I have a CD mounted read-only:
>
> /dev/scd0 on /mnt/cdrom type iso9660 (ro,noexec,nosuid,nodev)
>
> yet, if you look at some directories under the mount point:
>
> kenny 2:28pm [/mnt/cdrom/images/] > ls -la
> total 5781
> drwxrwxr-x 2 root root 2048 May 11 12:40 .
> drwxrwxr-x 10 root root 2048 May 11 12:59 ..
> -r--r--r-- 1 root root 192 May 11 13:20 TRANS.TBL
> -rw-rw-r-- 2 root root 1474560 May 11 11:48 boot.img
> -rw-rw-r-- 3 root root 1474560 May 10 16:24 rescue.img
> -rw-rw-r-- 2 root root 1474560 May 11 11:49 supp.img
> kenny 2:28pm [/mnt/cdrom/images/] >
>
>
> ... notice the perms on some of the files are 664, not 444 as they should
> be.
> (if I try to append one of the files or touch a new one, I still get the
> 'read-only file system' error)
>

The attributes on files are whatever they were when the virtual CD-ROM
was created. The process of creating a real CD-ROM, which is an image
copy operation, doesn't change these attributes and I certainly hope
they never do.

`ls` or whatever reads these file attributes. It makes no account of
whether or not the media is read-only. This is the same thing you get
when you export a file-system so that others may mount it read-only
over the network. The file attributes are not changed, but the media
(directory in this case) is read-only.

This is the correct behavior.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.118 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html