Re: mount: can not restrict mode of iso9660 files

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

 



On Wed, Jan 16, 2008 at 03:09:45AM +0300, Ilya N. Golubev wrote:
> Version: 2.13.1-rc2, without any changes.
> 
> It is not necessarily bug of util-linux itself.  However, since there
> is no other well known tool to make arbitrary `mount' system call, and
> specify to it as many options as `mount' program from util-linux
> allows, this program is the only way to reproduce the failure.  And
> even determining that it is something outside `mount' program is
> broken requires full- blown debugging of the program.
> 
> File system may contain data not to let any logged in user read.  Wish
> to specify more restrictive mode of files in it.  This certainly must
> occur on mount itself, not in subsequent `chmod' calls.  There is at
> least one obvious reason to avoid explicit `chmod', just as many other
> uses of it: possible race condition between it and other process
> opening the file.  Seeing no way to have `mount' do that.
> 
> When mounting read- only iso9660 file system, `mount' ignores
> `mode=400' file system option.  More precisely,

 I don't think it ignores the 'mode' option.

 # ./mount -t iso9660 -o ro,norock,mode=0400,uid=500 /dev/scd0 /mnt/cdrom

 # ls -lan /mnt/cdrom/
 total 193770
 dr-xr-xr-x  1 500 0      2048 2003-11-25 18:06 .
 drwxr-xr-x 14   0 0      4096 2007-10-17 02:05 ..
 -r--------  1 500 0     25214 2003-08-28 09:46 AUTORUN.ICO
 -r--------  1 500 0        46 2003-09-08 05:26 AUTORUN.INF
 -r--------  1 500 0   1033834 2003-11-21 10:10 DATA1.CAB
 -r--------  1 500 0    205406 2003-11-21 10:22 DATA1.HDR
 -r--------  1 500 0 196390173 2003-11-21 10:22 DATA2.CAB
 dr-xr-xr-x  1 500 0      2048 2003-10-23 06:28 DIRECTX
 -r--------  1 500 0    344923 2001-09-04 22:24 IKERNEL.EX_
 -r--------  1 500 0       417 2003-11-21 10:22 LAYOUT.BIN
 dr-xr-xr-x  1 500 0      2048 2003-11-21 13:01 MANUALS
 -r--------  1 500 0    167936 2001-09-04 23:03 SETUP.EXE
 -r--------  1 500 0       229 2003-11-21 10:09 SETUP.INI
 -r--------  1 500 0    235068 2003-11-21 10:09 SETUP.INX


 it seems the 'mode' option doesn't effect on directories, but it's an
 iso9660 & kernel problem. The mount(8) correctly calls mount(2) with
 mode option.

 You can try more verbose mode (mount -v -v -v) or strace.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux