[olug] Odd results from /bin/sh (GNU bash) and the "test" command...

Will Langford unfies at gmail.com
Fri Feb 26 00:56:37 UTC 2010


>
> But when the file is in /sys, the results are consistent:
> $ mount | grep sysfs
> none on /sys type sysfs (rw,noexec,nosuid,nodev)
>
> $ cat /sys/bus/pci/drivers_probe
> cat: /sys/bus/pci/drivers_probe: Permission denied
>
> $ sudo -i
> # cat /sys/bus/pci/drivers_probe
> cat: /sys/bus/pci/drivers_probe: Permission denied
>
> I wonder if it is a sysfs problem...?
>
>
sysfs... is... not your typical file system.  afaik, a fs can deny read
access to something if you're intentionally not supposed to be able to read
it -- ie: if there's nothing to read, deny the low level read ops from
working, etc.

I believe /sys/bus/pci/drivers_probe is a write only 'object' if you will ?

-Will



More information about the OLUG mailing list