Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

migrated from Jun 4 '13 at 14:16

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

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

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

You must log in to answer this question.