- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: log 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
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
тАО09-06-2005 01:16 AM
тАО09-06-2005 01:16 AM
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2005 01:23 AM
тАО09-06-2005 01:23 AM
SolutionPete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2005 01:30 AM
тАО09-06-2005 01:30 AM
Re: log file permissions
You can always set the 'umask' of the process creating the files to 022 to yield files with an octal permission of 644. See the manpages for 'umask' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2005 01:36 AM
тАО09-06-2005 01:36 AM
Re: log file permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2005 03:51 AM
тАО09-06-2005 03:51 AM
Re: log file permissions
Files with = -rw-r--r-- , i.e 644.
Directories = drwxr-xr-x , i.e 755.
------
you have to make minus , to umask value, to get to know what will be the generated permission :
1) For file : 666-umask value.
2) For Dir : 777-umask value.
---
You can change the umask accordingly to change the default file creation permission.
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 01:09 AM
тАО09-07-2005 01:09 AM
Re: log file permissions
I think if i change new value to umask 022 it might change all new file generation with defualt permissions 644.
I have seen some file permissions in system related directories where file permision has been set to 600 and don't want to change them.
Actually, i just want to set the value so that the new log file generated has permission 644 in the apache log directory only.
Appreciate any suggestion.
Thanks,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 01:33 AM
тАО09-07-2005 01:33 AM
Re: log file permissions
It seems that the logfile permissions set to 600 , and if you want to set it 644 for the newly generated logfiles you have to change the umask.
1. Check which usre resposible for generating those logfiles.
2. Check the user profile
3. Check the current umask .
# umask
4. To set the umask (022) need to midify the profile and you can set.
# vi .profile
umask 022 [ edit the existing entry ]
save & exit.
Please let us know further,
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 01:37 AM
тАО09-07-2005 01:37 AM
Re: log file permissions
chmod 644 /
or set a 022 umask for the apache logger user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 01:43 AM
тАО09-07-2005 01:43 AM
Re: log file permissions
The apache log files are generated by the root user. Instead of changing .profile of root, can i use umask 022 from command line ?
I am not pure sys admin on these boxes but web server admin.
My concern is if i change .profile of root user that might be concern to sys admin team.
Thanks,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:00 AM
тАО09-07-2005 02:00 AM
Re: log file permissions
If you want to change the permission of a file you can use chmod command. it will not effect the old file permission and the new file permission you are going to create .if you want to change it permanent you can use umask ( and normally umask is different for root user (022 ) and the normal user (022).
You can set the umask for each user by editing there .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:03 AM
тАО09-07-2005 02:03 AM
Re: log file permissions
Both way it will change the entire umask to 022 , either you put in .profile of root , or you run through command.
If you want to change the specific log files permissions , you can put a command in cron as mentioned Pilati, that will make the job easier.
You can give 2min , 5min or 10 min interval as you wish. And it will not interact with other files and dirctories . So it will be safe.
Hope this will help ,
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:18 AM
тАО09-07-2005 02:18 AM
Re: log file permissions
putting that instruction in the cronjobs is not system-performance-lowering, and it's the only way to have a permission control about single files within the same creator (root in your case)...
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:26 AM
тАО09-07-2005 02:26 AM
Re: log file permissions
Please letus know, if you need any help regarding crontab .
It seems you wanted the logs to be read by everyone as permission 600 will not allow that , 644 will allow.
And hope you can do that successfully,
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 02:42 AM
тАО09-07-2005 02:42 AM
Re: log file permissions
to add the entry in the crontab of root follow these steps:
as root, run:
crontab -e
then add the following row:
* * * * * chmod 644 /
then save the crontab file as in vi (digit ESC and then :wq! )
Wait the next minute and you'll have your log permissions as you wanted.
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 07:23 AM
тАО09-07-2005 07:23 AM
Re: log file permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 07:30 AM
тАО09-07-2005 07:30 AM
Re: log file permissions
You can do like that :
1.
#crontab -e
add
10,20,30,40,50,59 * * * * chmod 644 /
cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 05:16 PM
тАО09-07-2005 05:16 PM
Re: log file permissions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 07:09 PM
тАО09-07-2005 07:09 PM
Re: log file permissions
the entry "* * * * * ..." in crontab means that the script will be executed every minute of every hour of every day of every month...
regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 07:10 PM
тАО09-07-2005 07:10 PM
Re: log file permissions
yes, it will work, but if more logs will be created in that directory, you will have to run that command again...
good luck
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2005 07:18 PM
тАО09-07-2005 07:18 PM
Re: log file permissions
So instead of
$chmod -R 644 access_log*
Better give
chmod -R 644 log_dir/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 07:38 PM
тАО09-08-2005 07:38 PM
Re: log file permissions
Please suggest if i understood correctly.
Thanks,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 08:49 PM
тАО09-08-2005 08:49 PM
Re: log file permissions
Yes you are right...
Think about cronjob solution maybe the nearest to your needs.
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 09:00 PM
тАО09-08-2005 09:00 PM
Re: log file permissions
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 10:37 PM
тАО09-08-2005 10:37 PM
Re: log file permissions
note that you can also display the current file mode creation mask value by issuing the command commands:
umask -S
also, if you want it for all the users, you can add the command to /etc/profile
regards
yogeeraj