Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I am copying files to my Linux Machine using cigwin, the userID and Group ID is always set to 544 and 513.

I am expecting this to be "root" "root' for RedHat and "root" "system" for AIX.

I think I need to make some change in /etc/passwd and /etc/group. But not able to figure out the exact correct change?

share|improve this question
    
Weird, root is usually 1:1 (user:group). usermod -u -g are the parameters to be used. –  fedorqui Jun 4 '13 at 13:17
    
"I am expecting this to be "root"" Why, are you connecting as root? –  Ignacio Vazquez-Abrams Jun 4 '13 at 14:24
add comment

migrated from stackoverflow.com Jun 4 '13 at 14:16

This question came from our site for professional and enthusiast programmers.

1 Answer

When you unarchive a tar file as root (using the tar command) it will write out the files with the original permissions and owner of the files as they were archived. Since you likely don't have a user or group with the userid and groupid set to 544 and 513 respectively, ls shows the numerical userid instead.

From the tar man page:

-p      (x mode only) Preserve file permissions.  Attempt to restore the
         full permissions, including owner, file modes, file flags and
         ACLs, if available, for each item extracted from the archive.  By
         default, newly-created files are owned by the user running tar,
         the file mode is restored for newly-created regular files, and
         all other types of entries receive default permissions.  If tar
         is being run by root, the default is to restore the owner unless
         the -o option is also specified.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.