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

Dave Thacker dthacker9 at cox.net
Fri Feb 26 12:53:02 UTC 2010


On Thursday 25 February 2010 22:08:33 Kevin wrote:
> A filesystem can also deny write access if it has reason to do so. I
> bet the guys at my last job would love to know why ext3 sometimes
> feels it necessary to switch to read-only mode. On production database
> servers, this results on urgent calls at 8:01 am.

I used to have a web server running SLES that did that periodically.  It was 
caused by a slowly (over 12 months) failing hard drive.  fsck would put it 
right until the last time........

Dave
>
> On Thu, Feb 25, 2010 at 18:56, Will Langford <unfies at gmail.com> wrote:
> >> 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
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > https://lists.olug.org/mailman/listinfo/olug
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug





More information about the OLUG mailing list