[syslog-ng] I/O error occurred while reading; fd='4',error='Operation not permitted (1)'

Justin Randall jrandall at comwave.net
Wed Jan 3 00:48:09 CET 2007


Hey again,

Could you actually send the full output from strace without filtering
specific system calls?  It would be helpful to see the full deal as to
what's going on with the thread creation, and the calls to "close" on
certain file descriptors.

Thanks,

Justin.

-----Original Message-----
From: Justin Randall 
Sent: Tuesday, January 02, 2007 6:32 PM
To: Syslog-ng users' and developers' mailing list
Subject: RE: [syslog-ng] I/O error occurred while
reading;fd='4',error='Operation not permitted (1)'

You are correct in that fd 4 is /proc/kmsg as this can be verified in
the line:

open("/proc/kmsg", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 4

The returned value for the call to "open" is the file descriptor.
Calling "chroot" in between calls to "open" and "read" is not a problem.
I've written another application which does without problems.

I think however, that the path used when opening the file should be
changed to the full path rather than the chroot'd absolute path.  Since
the call to "open" is done to "/proc/kmsg" before the chroot, this falls
outside of the jail's access.  Try changing the path to
"/var/local/chroot/syslogng/proc/kmsg" and see if this resolves the
issue.

I hope this helps,

Justin.

-----Original Message-----
From: Matt Miller [mailto:syslog-ng at mattmillersf.fastmail.fm] 
Sent: Tuesday, January 02, 2007 5:18 PM
To: Syslog-ng users' and developers' mailing list
Subject: RE: [syslog-ng] I/O error occurred while reading;
fd='4',error='Operation not permitted (1)'

> > running in a jail via the "-C" option, but ... syslog-ng[19522]:
> > I/O error occurred while reading; fd='4', error='Operation not
> >   permitted (1)'
>
> Looking at that attached output, my best guess at what's opened on
> descriptor 4 is /proc/kmsg.

Could the problem be that /proc/kmsg is opened before the chroot, but
then read after the chroot?
_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html




_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html






More information about the syslog-ng mailing list