I need to use the tar command to unpack a .tar.gz file and I need to do it from root but when the files unpack I want them to be owned by a specific user, not the root user. Can someone give me a hand?. I found the man pages confusing.
lewashby
56
Junior Poster
Recommended Answers
Jump to PostThe easiest is probably to use
chown
to change the owner of the directory after you've extracted it. And you can usechmod
too to remove some permissions for group and others too.Let's say you have the file
my_archive.tar.gz
which contains a top-level directory calledmy_folder
, and the user …
All 4 Replies
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
davidnelson4911
0
Newbie Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.