- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to force file permission of new files under ce...
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-06-2005 12:44 AM
06-06-2005 12:44 AM
How to force file permission of new files under certain directory
How can I force the application generate the file with permission like "-rw-rw-rw-" ? or How can I force all new files to be "-rw-rw-rw-" under a certain directory?
Can ACL help?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2005 12:51 AM
06-06-2005 12:51 AM
Re: How to force file permission of new files under certain directory
How is the application being launched? From a .profile?
If so, prior to the execution of the application, put a 'umask 002' (which should create files as -rw-rw-r--).
I'd couple this with setting the directory sgid (chmod g+s /logs), and setting the correct group on '/logs'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2005 12:54 AM
06-06-2005 12:54 AM
Re: How to force file permission of new files under certain directory
the application that creates the file (log) may chmod just after creating it. I thing that's the easier way.
regards,
xyko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2005 01:31 AM
06-06-2005 01:31 AM
Re: How to force file permission of new files under certain directory
setting the umask solves the problem but it brings another one. umask will affect all files and directories during the shell session, not only the desired /log directory and for the scope of the application. So, one has to remember to set umask back to the defaults just after the application has finished.
regards,
xyko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2005 02:16 AM
06-06-2005 02:16 AM
Re: How to force file permission of new files under certain directory
> How can I force the application generate the file with permission like "-rw-rw-rw-" ?
One more thing -- log files writable by anybody... not a good idea.
Regards,
Ross