|
|

楼主 |
发表于 2005-7-15 09:49:50
|
显示全部楼层
About /dev/null (Problem solved)
In my /etc/fstab, I added the "users" option in order to allow normal user to mount the specific partition:
#cat /etc/fstab |grep /dev/hda8
/dev/hda8 /mnt/hda8 ext3 noauto,users,exec 0 0
However, the "users" mount option implies "noexec", "nosuid" and "nodev" (unless overridden by subsequent options). Therefore, when I attempt to mount /dev/hda8, I got:
#mount /dev/hda8
#mount |grep /dev/hda8
/dev/hda8 on /mnt/hda8 type ext3 (rw,nosuid,nodev)
Here, noexec is overridden by my exec option in /etc/fstab
To solve the problem, I must get rid of the nodev option.
I may append a ",dev" option to my /etc/fstab or mount my chroot filesystem as below:
#mount /dev/hda8 /mnt/hda8 -o rw
Now, the mount option is changed:
#mount |grep /dev/hda8
/dev/hda8 on /mnt/hda8 type ext3 (rw)
#chroot /mnt/hda8 /bin/sh
sh-3.00#ls > /dev/null
sh-3.00#
Problem solved. Cheers!
Further reference:
http://www.knoppix.net/wiki/Dev_null_permission_denied |
|