From owner-freebsd-questions@FreeBSD.ORG Sat Dec 27 21:14:26 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F1D106564A for ; Sat, 27 Dec 2008 21:14:26 +0000 (UTC) (envelope-from mmitar@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 2FADC8FC19 for ; Sat, 27 Dec 2008 21:14:25 +0000 (UTC) (envelope-from mmitar@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2168800ywe.13 for ; Sat, 27 Dec 2008 13:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=jPh2SHd5Sk4n9B6bpTzsDApGeGvjniBve/FGHdohf9s=; b=Ny3AZD4Fdwl+SJDC+r0sUYf/jZArOEr2eSgpLY8ZR+rmZ48Nd6qAlU5P3+XwLZnkgU R2MG9qgLYiAv3BIPOOM3O48RbCy4A9W0PT+gRRJMpc/CuVLr2GSU6Xbk1kjINWOvl/sQ LgUku6woy31KaMwJ7IWMmAIhdMshGtug8JGbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=wzdd+QhvlzuYTzl0J4hREWL3eaZRHFPxmuxsF5d9q0amqRPnrXW1NzjtAU9ROqcxRU qyDUjXuDzf41QlD6axSB3S+CXlgP8bXh0k6itVG2UJ+mxOAuhdlkNPtTSt9TzQ8nEJN9 qCVie6DnlcvCdwgEhz3XU9CRYdHUGnx/nCwiQ= Received: by 10.100.254.15 with SMTP id b15mr6948694ani.35.1230410763743; Sat, 27 Dec 2008 12:46:03 -0800 (PST) Received: by 10.100.6.8 with HTTP; Sat, 27 Dec 2008 12:46:03 -0800 (PST) Message-ID: Date: Sat, 27 Dec 2008 21:46:03 +0100 From: Mitar To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Open with O_APPEND fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 21:14:26 -0000 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