- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- permission question
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-11-2006 05:46 AM
07-11-2006 05:46 AM
I just created a new group. I changed all of the files/directories in a specific tree to the new group. Now I want to find all of the files/directories that are in that specific tree, and change the group permissions to be the same as the owner permissions.
There might be an easier way to do that than using the find command, but I couldn't come up with one.
So I want the file/directory that has
r--XXXXXX to get changed to r--r--XXX where X is "don't care". I want the file/directory that has
rw-XXXXXX to get changed to rw-rw-XXX and
I want the file that has
rwxXXXXXX to get rwxrwxXXX
I suppose that should even include the UID and/or GID bits also. So if the original has
rwxr-sXXX
it should get changed to
rwxrwsXXX
That last condition may add way to much complexity, so I may have to address those issues individually.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2006 06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2006 06:26 AM
07-11-2006 06:26 AM
Re: permission question
That does exactly what I asked for. Thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2006 06:49 AM
07-11-2006 06:49 AM
Re: permission question
Here's how to get the numeric permissions of a file with perl:
perl -e 'printf("%04o\n",(stat($ARGV[0]))[2]&07777);' file
Use this along with some bit manipulation in a larger perl script to accomplish what you're looking for. Seems like it would be a fun little script to write, but I don't have time at the moment.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2006 03:07 AM
07-12-2006 03:07 AM
Re: permission question
Or one only of the following letters:
u Copy the current user permissions to who.
g Copy the current group permissions to who.
o Copy the current other permissions to who.