- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Resume the file owner
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
Discussions
Discussions
Forums
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
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
тАО11-29-2010 10:55 PM
тАО11-29-2010 10:55 PM
Resume the file owner
- Tags:
- chown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2010 11:01 PM
тАО11-29-2010 11:01 PM
Re: Resume the file owner
use
chown -R username:group dirname
so that it will change for all sud dir and files inside that main dir.
regards
MC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2010 11:15 PM
тАО11-29-2010 11:15 PM
Re: Resume the file owner
overwrite option from backup will be accurate.
unless (chown -R Recursively change the owner or group . but if child folders do not same owner & group will be bit difficult you need eye-ball)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2010 11:38 PM
тАО11-29-2010 11:38 PM
Re: Resume the file owner
1) The file are in one single path , no sub-diectory
2) the original files owner are different users ( not just one single user ) , so I think chown is not work in my case .
eg .
original files
==========
drwxrwxrwx 2 user1 EDP 36K Nov 30 14:09 file1
-rwxrwxrwx 1 user2 EDP 0 Feb 18 2010 file2
-rwxrwxrwx 1 user3 EDP 0 Feb 18 2010 file2
Now file
drwxrwxrwx 2 root EDP 36K Nov 30 14:09 file1
-rwxrwxrwx 1 root EDP 0 Feb 18 2010 file2
-rwxrwxrwx 1 root EDP 0 Feb 18 2010 file2
What I would like is to change the file owner back to original , but do not want to overwrite the files .
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2010 11:49 PM
тАО11-29-2010 11:49 PM
Re: Resume the file owner
>...to change the file owner back to original...
In this case (you specified that you do not want to overwrite the files from backup), you do not have any option except to manually chown every single file to the desired owner/group. The correct ownership you could find out from the most recent backup available.
You could make a script to read the ownerships of the files in the archive and restore those to the files saved on the server.
Best regards
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2010 12:22 AM
тАО11-30-2010 12:22 AM
Re: Resume the file owner
2) the original files owner are different users ( not just one single user ) , so I think chown is not work in my case . <<<<<
if you say so -> YES.
if your satisfied with answers / suggestion provided.. pls assign points
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2010 03:33 AM
тАО11-30-2010 03:33 AM
Re: Resume the file owner
I have a script that may work. See my reply to this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1215123
chown_script_A.sh & chown_script_B.sh
Since the files are in a different path, you may have to change the scripts.
>1) The file are in one single path, no sub-directory
This is also simple to change. You can use awk or read to parse the output of ll(1) and generate the chown commands.
>Horia: You could make a script to read the ownerships of the files in the archive
Or read from the restored files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2010 04:08 AM
тАО11-30-2010 04:08 AM
Re: Resume the file owner
Or use tar -tv against the archive backup to list the file modes and owner information. No need to restore on a separate directory the archive (space/time consuming).
Best regards,
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2010 05:39 AM
тАО11-30-2010 05:39 AM
Re: Resume the file owner
Yes but ivy1234 said it was already done.