- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: log file permisson changed
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
тАО01-22-2010 07:40 PM
тАО01-22-2010 07:40 PM
log file permisson changed
My hpux itanium server rx600 11.23 running some archive applications. application user creating every day log files into the /var/adm/XXXXXX/log/messages/ directory with world writble permission. Is any one can adivce how to set file permission 755 for every day new files ?
I checked umask is set 022. Should I need to set up any umask value in user .profile ?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 07:43 PM
тАО01-22-2010 07:43 PM
Re: log file permisson changed
Yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 07:46 PM
тАО01-22-2010 07:46 PM
Re: log file permisson changed
http://www.unix-manuals.com/forum/viewtopic.php?p=384
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 08:29 PM
тАО01-22-2010 08:29 PM
Re: log file permisson changed
Thanks for your reply.I set up the umask value 022 in user .profile, but it not worked . the new log file just created with same initial values
-rw-rw-rw- 1 lead otex 766 Jan 22 23:20 job_TA_1509.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 08:53 PM
тАО01-22-2010 08:53 PM
Re: log file permisson changed
can you login as that user and create file and check the permission ?
Login :- abcd
password
#touch log
# ll -l log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 08:59 PM
тАО01-22-2010 08:59 PM
Re: log file permisson changed
I believe above mentioned folder "owner" belongs" to "root"
its better to write script to find those file and change the permissions as per your requirement?
why does your application dumping some archive applications file under "Operating System" file system /var/adm
its always better to keep all you application files and logs . away from operating system files and directory structure
or try changing the "umask" value for "root"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 09:01 PM
тАО01-22-2010 09:01 PM
Re: log file permisson changed
_That_ is where the umask needs to be set.
Changing "user .profile" helps only if that
process actually uses "user .profile".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 09:07 PM
тАО01-22-2010 09:07 PM
Re: log file permisson changed
Yes I SU the user "lead" and created file which is good , but still original log file creating with writable permission.
root@ # id
uid=20002(lead) gid=207(otex) groups=201(dba)
root@ # touch log
root@ # ll -l log
-rw-r--r-- 1 lead otex 0 Jan 23 00:01 log
===================================
Follwing is original file created by user
-rw-rw-rw- 1 lead otex 766 Jan 22 23:00 job_1595.log
-rw-rw-rw- 1 lead otex 766 Jan 23 00:00 job_1598.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 09:23 PM
тАО01-22-2010 09:23 PM
Re: log file permisson changed
_That_ is where the umask needs to be set.<<<
Hi Salm, -> look comment from >>Steven Schweda<< -> he is right, I agree
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2010 09:58 PM
тАО01-22-2010 09:58 PM
Re: log file permisson changed
Have you tried below:
1. After logged in check umask value.
# umask
# echo $SHELL
Check .profile and /etc/profile for umask value should be 022
2. touch a file and dir and check the value.
# touch abc
# mkdir abc_dir
# ll -d abc_dir
You should be getting 755 i.w ( drwxr-xr-x ).
3. If #2 is ok, then check the permission by creating a file manually in the log directory. If it works ok. Else you have to use a function in the script while logfile creation.
HTH,
Raj.