From owner-freebsd-questions Thu Sep 12 11:45:52 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E0CB37B400 for ; Thu, 12 Sep 2002 11:45:50 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A17143E3B for ; Thu, 12 Sep 2002 11:45:50 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.5) id g8CIjlH8050678; Thu, 12 Sep 2002 13:45:47 -0500 (CDT) (envelope-from dan) Date: Thu, 12 Sep 2002 13:45:47 -0500 From: Dan Nelson To: Andreas Wideroe Andersen Cc: freebsd-questions@FreeBSD.ORG Subject: Re: tar: user/group= 501 & Changing symlinks owner/group Message-ID: <20020912184547.GB42486@dan.emsphone.com> References: <5.1.0.14.2.20020912202103.02799e30@pop.eunet.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20020912202103.02799e30@pop.eunet.no> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Sep 12), Andreas Wideroe Andersen said: > Everytime I (root) issue a tar -xvf somefile.tar the user and group > of the "untar'ed" files/dirs become 501: > > -rwxr-xr-x 1 501 501 7364 May 22 03:15 status_file.php > lrwxr-xr-x 1 501 501 9 Sep 12 19:52 t3lib -> ../t3lib/ > > How come? When you extract tarfiles as root, they extract with whatever userid the creator had. > I want the user/group to be set to Ie. test:test, but a chown -R > * test:test doesn't change the owner/group of the symbolic link. I've > read in man 7 symlink where it says symbolic link owners can be > changed using lchown. I don't seem to have the command lchown... You can use "chown -h" to change the owners of symlinks. It usually doesn't matter, as the ownership of a symlink is never used afaik. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message