- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How can I change the permissions only for file...
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-18-2009 04:20 AM
тАО11-18-2009 04:20 AM
Note: Points will given without fail
1) How can I change the permissions only for files/directories
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 04:43 AM
тАО11-18-2009 04:43 AM
Re: How can I change the permissions only for files/directories
As opposed to what? Unless I am missing something here, the chmod command is used to change the permissions for user owner, group owner or other users. The man page for chmod has a lot of good details, no need to reinvent the wheel here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 04:48 AM
тАО11-18-2009 04:48 AM
Re: How can I change the permissions only for files/directories
> only for files/directories
What do you mean? All files and subdirectories beneath a starting directory? Only regular files and not subdirectories beneath a starting directory? The permissions of things like symbolic links don't matter and changing them changes the permissions of the object to which they point.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 05:00 AM
тАО11-18-2009 05:00 AM
Solutionfind * -prune -type f | xargs chmod 644
or
find * -prune -type f -exec chmod 644 \+
Directories only:
find * -prune -type d | xargs chmod 755
or
find * -prune -type d -exec chmod 755 \+
If you want to process all the sub-directories of the current directory (changing all files in sub-directories or all sub-directories), just remove the -prune option.
Old HP-UX versions may not understand "-exec
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 05:27 AM
тАО11-18-2009 05:27 AM
Re: How can I change the permissions only for files/directories
Thanx all those who replied.
Files
------
find . -type f -exec chmod 700 {} \;
Direc
------
find . -type f -exec chmod 700 {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2009 05:28 AM
тАО11-18-2009 05:28 AM