- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Changing perms to owner then back to original.
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
07-07-2008 10:04 AM
07-07-2008 10:04 AM
Changing perms to owner then back to original.
Example: If I start off with the following-
drwxr-xr-x cadadmin users scripts
drwxr-xr-x twetendl users twetendl
drwxr-xr-x valisys users valisys
drwxr-xr-x vanberbj users vanberbj
drwxr-xr-x walliske catia walliske
I need to change it to prior to the cron job starting:
drwxr-xr-x cadadmin users scripts
drwxr-xr-x cadadmin users twetendl
drwxr-xr-x cadadmin users valisys
drwxr-xr-x cadadmin users vanberbj
drwxr-xr-x cadadmin catia walliske
The change it back after the cron job runs.
drwxr-xr-x cadadmin users scripts
drwxr-xr-x twetendl users twetendl
drwxr-xr-x valisys users valisys
drwxr-xr-x vanberbj users vanberbj
drwxr-xr-x walliske catia walliske
We have looked at ACL’s but this will not work due to restriction of the how the cron job is running.
I know I can use the 'find' command to find the directories and change the ownership. I am unsure how to retain the orginal ownership and use it to change the ownership back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2008 10:16 AM
07-07-2008 10:16 AM
Re: Changing perms to owner then back to original.
If so supply some big picture and maybe we can come up with a bigger solution ?
Other than finding the dirs and current perms then saving in a file, you will then need to parse out the rxwrw-r-x into either binary ( 765 or chars u+rwx,g+rw,o+rx ). not very eloquent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2008 10:18 AM
07-07-2008 10:18 AM
Re: Changing perms to owner then back to original.
It the cron job is running as root you could build a listing in a tempfile with each file/directory path and the original permissions/ownership and use that file later on to restore the original settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2008 10:28 AM
07-07-2008 10:28 AM
Re: Changing perms to owner then back to original.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2008 10:34 AM
07-07-2008 10:34 AM
Re: Changing perms to owner then back to original.
one dirty way will be to use ssh and script commands that will set the desired permissions.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2008 01:48 PM
07-07-2008 01:48 PM
Re: Changing perms to owner then back to original.
or using ACLs.
> We have looked at ACLâ s but this will not
> work due to restriction of the how the cron
> job is running.
Are you offering an impossibility proof for
this, or should we believe that you've tried
everything?
What, exactly, is this "restriction", and
why can't it be changed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2008 03:41 AM
07-08-2008 03:41 AM
Re: Changing perms to owner then back to original.
I have two scripts posted that will save and restore owners and permissions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2008 05:07 AM
07-08-2008 05:07 AM
Re: Changing perms to owner then back to original.
If you want some examples, please see the below link:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1190418
If you can explain exactly where you stuck, then someone will be able to assist you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2008 06:46 AM
07-08-2008 06:46 AM