Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2008 21:46:03 +0100
From:      Mitar <mmitar@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Open with O_APPEND fails
Message-ID:  <f63c4b2d0812271246u18a881e6j87e0054c24f4661a@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi!

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.


Mitar



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f63c4b2d0812271246u18a881e6j87e0054c24f4661a>