From owner-freebsd-doc Thu Mar 28 17:30:23 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9C38737B416 for ; Thu, 28 Mar 2002 17:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2T1U1653653; Thu, 28 Mar 2002 17:30:01 -0800 (PST) (envelope-from gnats) Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 19E4937B41C for ; Thu, 28 Mar 2002 17:24:44 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id BCE62BDF8 for ; Thu, 28 Mar 2002 17:24:43 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id RAA11297 for ; Thu, 28 Mar 2002 17:24:42 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g2T1NH996251; Thu, 28 Mar 2002 17:23:17 -0800 (PST) (envelope-from swear@blarg.net) Message-Id: Date: 28 Mar 2002 17:23:17 -0800 From: "Gary W. Swearingen" Reply-To: swear@blarg.net To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/36447: chown(8) manual misdescribes handling of symlinks Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36447 >Category: docs >Synopsis: chown(8) manual misdescribes handling of symlinks >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 28 17:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Gary W. Swearingen >Release: FreeBSD 4.5-STABLE i386 >Organization: none >Environment: n/a ================ >Description: The chown(8) manual says: Chown sets the user ID and/or the group ID of the specified files. and -h If the file is a symbolic link, change the user ID and/or the group ID of the link itself rather than the file that the link points to. But without the -h option, symlinks given as arguments do not have their IDs changed (as implied by the first quote) nor are the symlinks followed (as implied by the second quote). ================ >How-To-Repeat: su cd /tmp touch jjjr ln -s jjjr jjjl l jjj* chown bin.bin jjjl l jjj* chown -h bin.bin jjjl l jjj* ================ >Fix: It should say: Chown changes the user ID and/or the group ID of the specified files. Symbolic links named by arguments are silently left unchanged unless "-h" is used. See the symlink(7) manual for the handling of symlinks with a trailing slash. and -h If the file is a symbolic link, change the user ID and/or the group ID of the link itself rather than silently leaving the link unchanged. Maybe the "symlink(7)" sentence should be omitted. No other manuals currently discuss the trailing slash feature/bug including symlink(7). I'll file a PR on the latter soon, so I say include the sentence. On the other hand, maybe the "-h" description SHOULD mention that it is ignored for symlinks with a trailing slash. But maybe not, if we assume that people are supposed to learn in the symlink(7) manual that a name with a trailing slash is never naming a symlink, but what it points to. I'm saying "not", for now. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message