Re: mysqld and multilog
"Michael J. Pomraning" <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 22 Nov 2004, Laurent Bercot wrote:
> --log=/dev/fd/1
> "Could not use /dev/fd/1 for logging (error 13)."
> 13 means EACCES.
> I don't understand why it doesn't work, but it doesn't work.
I've been surprised by this once or twice before in a changed-uid environment
with magic /dev files. /dev/fd/1 may be a symlink to an inherited pty opened
under a bygone uid, which pty the runtime user has no privileges to re-open.
For example, on my system, if I change uid to 'mysql' from a root shell, and
then try to re-open /dev/fd/1, I also get EACCES:
$ id
uid=101(mysql) gid=101(mysql) groups=101(mysql)
$ ls -Hl /dev/fd/1
crw--w---- 1 root tty 136, 5 Nov 24 00:30 /dev/fd/1
$ perl -e 'printf("%s (error %d)\n", $!, $!+0) unless defined open(F, shift)' /dev/fd/1
Permission denied (error 13)
Regards,
Mike