Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2002 13:45:47 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Andreas Wideroe Andersen <andreas@eunet.no>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: tar: user/group= 501 & Changing symlinks owner/group
Message-ID:  <20020912184547.GB42486@dan.emsphone.com>
In-Reply-To: <5.1.0.14.2.20020912202103.02799e30@pop.eunet.no>
References:  <5.1.0.14.2.20020912202103.02799e30@pop.eunet.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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