- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- chmod command
Operating System - HP-UX
1754278
Members
2658
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-26-2002 11:18 PM
тАО07-26-2002 11:18 PM
chmod command
Hi everybody
How can I change file mode access permissions to directory with files and subdirectories in it using one chmod command. For instance I have directory named level1 with files in it, also level1 directory has level2 subdirectory in it and so on. I want to chmod to everything in level1 directory to 777 using one chmod command.
Thanks
Kerry
How can I change file mode access permissions to directory with files and subdirectories in it using one chmod command. For instance I have directory named level1 with files in it, also level1 directory has level2 subdirectory in it and so on. I want to chmod to everything in level1 directory to 777 using one chmod command.
Thanks
Kerry
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2002 11:36 PM
тАО07-26-2002 11:36 PM
Re: chmod command
Of course you can, just assign -R parameter. Thus it can recursively change the file modes bit. For example:
#chmod -R 777 /level1
-Live as you wish-
Gerald Zhou
#chmod -R 777 /level1
-Live as you wish-
Gerald Zhou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2002 12:18 AM
тАО07-27-2002 12:18 AM
Re: chmod command
You can also use find to do this with a bit more control
find /level1 -exec chmod 777 {} \;
will change permissions on all files/directories below.
find /level1 -type f -exec chmod 777 {} \;
will change permissions on the files only.
find /level1 -type d -exec chmod 777 {} \;
will change permissions on directories only.
find /level1 -exec chmod 777 {} \;
will change permissions on all files/directories below.
find /level1 -type f -exec chmod 777 {} \;
will change permissions on the files only.
find /level1 -type d -exec chmod 777 {} \;
will change permissions on directories only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2002 01:36 AM
тАО07-27-2002 01:36 AM
Re: chmod command
I suggest that you use the find command; it's much safer and will only change the direory permissions -type d.
Now having said this, setting permissions to 777 is very insecure. Don't be tempted to trade convenience for security. I would at least restrict to 775 unless this truly is a wide-open directory.
Now having said this, setting permissions to 777 is very insecure. Don't be tempted to trade convenience for security. I would at least restrict to 775 unless this truly is a wide-open directory.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP