Open with O_APPEND fails
mmitar at gmail.com
Sat Dec 27 21:14:26 UTC 2008
I discovered that open syscall with only O_APPEND fails with
"permission denied" if an user does not have rights to write to a file
(what is normal) even if it is root (what is a surprise). For example,
if I have a file owned by www:www and with 644 permissions root cannot
do open("testfile", O_APPEND) call. If I change ownership of I change
permission to for example 666, call succeedes.
This works on Linux (Debian). So this is a feature? Or a bug?
(I discovered that because htpasswd failed to add new
username/password pair (ran as root) to a file owner by www.)
Checked on FreeBSD 7.0-STABLE.
More information about the freebsd-questions