dh-b...@online.de 写道:
> hello
> 
> i faced a very strange behaviour with the coreutils 8.4 chmod tool:
> 
> i mounted a dvd-ram and didn't recognize that it was mounted read-only
> (don't know why, actually). my first thought was that the access rights
> to the files were set improper. because the disk stores only archival
> stuff for everybody, and everybody means -I- on that system, i decided
> to set universal access rights (a quick thought without much
> investigation!) as root, i typed:
> 
> chmod -R 777 /media/*
> 
> interestingly, chmod didn't complain about the write-protection but,
> instead, the root filesystem got accessed for several seconds. i did a
> ctrl-c and found that chmod had actually done a:
> 
> chmod -R 777 /*
> 
> i can't explain this behaviour with common sense and consider it a bug.
> 
I can not reproduce this problem against the upstream chmod,

the scenario you mentioned is simulated as following,

j...@jeff-laptop:~$ mount
......
...
/dev/sda8 on /ocfs2 type ocfs2 (ro,heartbeat=none)
/dev/scd0 on /media/cdrom0 type udf (ro,nosuid,nodev,utf8,user=jeff)

j...@jeff-laptop:~$ sudo touch /ocfs2/b
touch: cannot touch `/ocfs2/b': Read-only file system
j...@jeff-laptop:~$ sudo chmod -R 777 /ocfs2
chmod: changing permissions of `/ocfs2': Read-only file system
chmod: changing permissions of `/ocfs2/lost+found': Read-only file system
chmod: changing permissions of `/ocfs2/a': Read-only file system

j...@jeff-laptop:~$ sudo chmod -R 777 /media/
chmod: changing permissions of `/media/cdrom0': Read-only file system
chmod: changing permissions of `/media/cdrom0/18.mov': Read-only file system
chmod: changing permissions of `/media/cdrom0/Masseuse.mp4': Read-only file 
system
chmod: changing permissions of `/media/cdrom0/Miindo2008.mkv': Read-only file 
system
chmod: changing permissions of `/media/cdrom0/SetupX64.avi': Read-only file 
system
chmod: changing permissions of `/media/cdrom0/WDK_6001_18001.iso': Read-only 
file system

could you supply more info?

> regards, 
> Dennis Heuer <dh-b...@online.de>
> 
> 
Regards,
-Jeff



Reply via email to