Installing .tar file changes user and group to a numeric value
I'm trying to install a tar file and as root, when I use the following tar commands
Code:
For some reason, it strips out the user id and group id and replaces with the the following numbers: 544 for UID and 400 for GID. Also, from what I'm reading, it looks like tar preverses permissions from one server to another, which I didn't know. Because of this, I can't install this file, is there a way around this? thanks |
You don't install a tar file. A tar file is just an archive full of other files, which could be anything (music, movies, data files, etc.). It's similar to a zip file.
What UID/GIDs get "stripped out"? Is it changing the permission of your existing files? Or are you just curious why the extracted files belong to a different user? From the tar man page: Code:
--same-owner Code:
--no-same-owner |
I did use the -p flag and that didn't work, still the same issue.
I went back and used the --no-same-permissions and that worked. I didn't realize that a non-root user can use that. Learn something new everyday. |
Quote:
root and regular users extract tar files differently, as explained in the man page. root preserves all permissions and owners from the archive, but this can be changed with --no-same-owner and --no-same-permissions. Regular users extract the files as themselves with their default umask, but this can be changed with --same-owner and --same-permissions (which is what -p does). |
All times are GMT -5. The time now is 05:17 AM. |