I ssh'd into a server as myself and created a directory called "misc" (for example) in /usr/local/share like this:
sudo mkdir /usr/local/share/misc
Then i cd'd to the /usr/local/share/misc, then i copied a tar file from another directory to the /usr/local/share/misc directory i created.
I then ran sudo tar -xvf mytarfile.tar because the permissions on the tar file were root::root, which extracted all the files in the /usr/local/share/misc.
My question is this, why when i un-tarred the files using sudo, in the directory i created with sudo, was the ownership of every file set to user as "jsmith" (just an example of another user on the system) , and the group was set to "users"?
Why weren't all the files set to root::root or myuserid:myuserid? We are both in sudoers with the same privileges.
Thanks, this one is stumping me.