[CentOS] UID GID Problems.....

Brian Mathis brian.mathis at gmail.com
Tue Jan 19 14:44:28 UTC 2010


On Tue, Jan 19, 2010 at 8:43 AM, Tom Bishop <bishoptf at gmail.com> wrote:
> Hoping someone can help me fix something that I apparently messed up, i have
> the issue that when I untar a file as root the uid and gid that get set are
> not roots'.  I had change a user uid and gid to 1000 via usermo -u etc....
> but somehow it appears to have effected the root user.  When I touch files
> as root the correct uid and gid are root, however when untaring an archive
> the directory and files are uid and gid =1000.  Hope someone can point me in
> the right direction....oh yea, running centos 5.4, and when I run the
> command id = uid=0, gid=0, etc,,,,all appear to be right for root....Thanks
> in advance.

When you untar as root, the UID/GID is always set to that of the user
who created the tar file.  Only if you untar as a normal user does it
change the ownership to the user who untarred it.



More information about the CentOS mailing list