- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to save and restore all the permission of ...
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
тАО05-13-2009 06:44 PM
тАО05-13-2009 06:44 PM
Re: How to save and restore all the permission of the folder.
$ ll
drwxrwxr-x ... SAM1/
$ pax -v -w -f foo.tar -d SAM? # write pax
SAM1/
$ pax -v -f foo.tar # list pax
USTAR format archive
drwxrwxr-x 0 UUU GGG ... SAM1/
$ chmod go= SAM?
$ ll
drwx------ 2 UUU GGG ... SAM1/
$ pax -v -r -f foo.tar # read pax
USTAR format archive
SAM1/
$ ll
drwxrwxr-x 2 UUU GGG ... SAM1/
The permission is restored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 06:32 AM
тАО05-14-2009 06:32 AM
Re: How to save and restore all the permission of the folder.
I am not able to revert back to original permission.
I do following things as you said.
1)First listing the existing permission.
# ll -d home
drwxr-xr-x 11 root root 248 Apr 22 05:32 home
2)I am writing permissions of /home
# pax -v -w -f foo.tar -d /home
/home
pax: ustar vol 1, 1 files, 0 bytes read, 10240 bytes written.
3)I am seeing the permissions of /home folder.
# pax -v -f foo.tar
drwxr-xr-x 2 root root 0 Apr 22 05:32 /home
pax: ustar vol 1, 1 files, 10240 bytes read, 0 bytes written.
4) changing the permission of /home directory.
# chmod 775 /home
5)checking new permissions.
# ll -d /home
drwxrwxr-x 11 root root 248 Apr 22 05:32 /home
6) reverting the old permissions.
# pax -v -r -f foo.tar
/home
pax: ustar vol 1, 1 files, 10240 bytes read, 0 bytes written.
7) But it is not changing
For example:
# ll -d /home
drwxrwxr-x 11 root root 248 Apr 22 05:32 /home
So how to solve this problem.
And i want to take the permissions of the subfolders also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 06:23 PM
тАО05-14-2009 06:23 PM
Re: How to save and restore all the permission of the folder.
I have no problems doing that. I have PHCO_38165.
>I want to take the permissions of the subdirectories also.
$ find SAM1 -type d | pax -w -v -f foo.tar -d
SAM1/
SAM1/SUB_deeper/
$ pax -f foo.tar -v
USTAR format archive
drwx------ 0 UUU GGG ... SAM1/
drwxrwxr-x 0 UUU GGG ... SAM1/SUB_deeper/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 10:25 PM
тАО05-14-2009 10:25 PM
Re: How to save and restore all the permission of the folder.
Did you tried with "tar" command its easy to use
tar -cvf test.tar testdirectiory
go to desire location and restore and for the same location you need to remove the testdirectiory then restore
tar -xvf test.tar
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 10:38 PM
тАО05-14-2009 10:38 PM
Re: How to save and restore all the permission of the folder.
I don't see an option like pax's -d.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 10:48 PM
тАО05-14-2009 10:48 PM
Re: How to save and restore all the permission of the folder.
see the example
[root@rspc521 test]# mkdir test
[root@rspc521 test]# ll
total 4
drwxr-xr-x 2 root root 4096 May 15 11:47 test
[root@rspc521 test]# cd test
[root@rspc521 test]# touch a
[root@rspc521 test]# touch b
[root@rspc521 test]# touch c
[root@rspc521 test]# tar -cvf test.tar test
[root@rspc521 test]# ll
total 16
drwxr-xr-x 2 root root 4096 May 15 11:47 test
-rw-r--r-- 1 root root 10240 May 15 11:47 test.tar
[root@rspc521 test]# rm -Rf test
[root@rspc521 test]# tar -xvf test.tar
test/
test/a
test/b
test/c
[root@rspc521 test]# ll
total 16
drwxr-xr-x 2 root root 4096 May 15 11:47 test
-rw-r--r-- 1 root root 10240 May 15 11:47 test.tar
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2009 03:58 AM
тАО05-15-2009 03:58 AM
Re: How to save and restore all the permission of the folder.
Thanks for your reply. but if the directory size is 100GB and above. then it is not possible to copy the whole directory and restore it again.
What i am saying that we are changing some directories permission. And in future if we want to revert back the new permissions to old one. for that only i want to backup permission of the directories only but not contents.
Hi Dennis Handly,
I tried this (pax) in linux.
today i will try this is in hp-ux.
- « Previous
-
- 1
- 2
- Next »