All,
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.
I dont know why it picked the user "jsmith", who is another user on the system as i am, (see original post) and why the group didnt change from "users" to something else. Know the answers to these two questions would help me understand privileges more. I know if could just chown it after wards, but i would still like to know the reasons.
Omarfarid- remember jsmith:users wasnt the original ownership as shown above.