LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 01-09-2003, 02:43 AM   #1
juno
Member
 
Registered: Sep 2002
Location: fdas
Posts: 100

Rep: Reputation: 15
Preserve the ownership


After I gzip a file , then gunzip the file , the owner will be changed to me , how can I preserve the ownership to the original owner.

eg.

# ll abc.prn
-rw-rw-rw- UserA abc.prn
# whoami
UserB
# gzip abc.prn
# ll
-rw-rw-rw- UserB abc.prn.gz
#gunzip abc.prn.gz
#ll
-rw-rw-rw- UserB abc.prn

How to preserve the owner of the file abc.prn to original owner ( UserA) ? Thx.
 
Old 01-16-2003, 02:38 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Most likely this isn't possible, cause if a regular user had the power to create a file that another person owns, what would prevent that person to gain access to anything the other owner has that maybe he doesn't want anyone to have access to.

Your best option is to either su to the other user to gzip the file or just change the ownership, etc afterwards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
preserve file ownership with the "zip" command? zovres Linux - General 2 11-25-2004 10:01 PM
I want to preserve a pid linuxprogrammer Linux - Newbie 4 07-23-2004 10:55 AM
preserve links jmr71769 Debian 2 04-22-2004 11:01 AM
Why doesn't "cp -p <file>" copy <file> and preserve ownership? davidas Linux - Newbie 5 04-12-2004 06:44 AM
preserve the ownership juno Linux - General 5 01-09-2003 12:01 AM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration