- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing File Permissions
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
06-17-2003 07:46 PM
06-17-2003 07:46 PM
I would like to change the file permissions for several files under a specific directory and it's sub / sub-sub directory.
Will appreciate if you can let me know the best way to do this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 07:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 07:57 PM
06-17-2003 07:57 PM
Re: Changing File Permissions
# for i in `cat filelist`
> do
> chmod 555 $i
> done
or using find
# find /mydir -name "file string" | xargs chmod 555
# find /mydir -xdev -type f -perm 666 | xargs chmod 644
It really depends on the files ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 08:22 PM
06-17-2003 08:22 PM
Re: Changing File Permissions
# chmod -R 505
Change owner of specific directory recursively:
# chown -R user:group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 08:31 PM
06-17-2003 08:31 PM
Re: Changing File Permissions
# chmod -R xxx dir-name shd slove your problem . xxx indicats file permition which you want to assign.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 09:52 PM
06-17-2003 09:52 PM
Re: Changing File Permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 12:08 AM
06-18-2003 12:08 AM
Re: Changing File Permissions
I liked the command -
find /mydir -xdev -type f -perm 666 | xargs chmod 644
As I understand about xdev and xargs clearly using the man, but could you pl. explain this in your term?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 12:35 AM
06-18-2003 12:35 AM
Re: Changing File Permissions
one more tip (you can refer it with 'man chmod'):
-R is recursively for directories and files, so you have to include the x-option (execute) for the dirs.
If you don't want this you can use:
chmod -R g+w /dir
So the permission of group is changed (w is added) for /dis, all sub-dirs and files.
Equal: u for owner, o for world/others
and '-' for permission is deleted.
Regards
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2003 01:44 AM
06-19-2003 01:44 AM
Re: Changing File Permissions
Vitaly