- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- preserve the ownership
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 06:19 PM
01-07-2003 06:19 PM
preserve the ownership
host//tmp> ll abc.prn
-rwxrwxrwx userA abc.prn
host//tmp> whoami
host//tmp> userB
host//tmp> gzip abc.prn
gzip: abc.prn: Operation not permitted
host//tmp> ll abc.prn*
host//tmp> -rwxrwxrwx userA abc.prn
-rwxrwxrwx userB abc.prn.gz
How to let the owner of the file "abc.prn.gz" is userA (except change it by root) ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 06:25 PM
01-07-2003 06:25 PM
Re: preserve the ownership
As long as userB owns the file, he can change the ownership of the file to anything.
$whoami
userB
$ll abc.*.gz
-rwxrwxrwx userB abc.prn.gz
$chown userA abc.prn.gz
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 06:26 PM
01-07-2003 06:26 PM
Re: preserve the ownership
When you gzip, or compress, a file, you are creating a NEW file. The gzip process reads the contents of the non-compressed file, pushes the data through the compression routines and writes it out to a new file.
When you create the new file, it will be owned by the user doing the gzip. The only way to have the owner be userA would be to do a 'chown userA abc.prn.gz' after the file is gzip'ed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 06:30 PM
01-07-2003 06:30 PM
Re: preserve the ownership
1- Ownership of a file can only be changed by the owner of the file or by root.
To be consistent, as user "userB" make a copy of the file first so that "userB" owns that copied file and then gzip it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 07:07 PM
01-07-2003 07:07 PM
Re: preserve the ownership
Log in as Userb ans gzip the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 07:12 PM
01-07-2003 07:12 PM
Re: preserve the ownership
check the -X option.This should be what you are looking for.
http://hpux.cs.utah.edu/hppd/hpux/Misc/unzip-5.50/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 07:15 PM
01-07-2003 07:15 PM
Re: preserve the ownership
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 07:46 PM
01-07-2003 07:46 PM
Re: preserve the ownership
Thanks all suggestion , I tried I can run chown to change owner to original owner on UNIX box , but can't do the same thing at Linux , can suggest how to do it on Linux ? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 07:50 PM
01-07-2003 07:50 PM
Re: preserve the ownership
Linux also has the same policy.
Use root to change the ownership or be the owner of the file.
Revert