Operating System - HP-UX
1835413 Members
2897 Online
110078 Solutions
New Discussion

Re: Why hp apache generating logs on hpux having permissions 600 ?

 
SOLVED
Go to solution
Shivkumar
Super Advisor

Why hp apache generating logs on hpux having permissions 600 ?

Dear Sirs;

We are running HP Apache on HPUX. The apache is being configured to run as "www" user. Apache starts as a "root" user but switches to run as a "www" user.

The access and error logs files are generated having permissions as 600 and as a result other users can't access it and i need to change it manually every time. Writing shell script to change the logs permissions and running it as a cron job doesn't seems to be a viable option here. I changed the umask value on the box as 022 but it didn't help.

Can someone suggest why apache is generating logs having permissions 600 and how to fix it ?

Thanks,
Shiv
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Why hp apache generating logs on hpux having permissions 600 ?

Apache is run by a non-priviledged user for security concerns.

Over the years people have used buffer overload and other hacks to get priviledges on the machine running apache. Its best when this happens that the user not be root.

Your log permissions are probably being determined by umask set in /etc/profile or .profile

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Henk Geurts
Esteemed Contributor

Re: Why hp apache generating logs on hpux having permissions 600 ?

hi Shiv
did you also check the .profile of the www-user for a umask ?
edit it or add it ....
let me know .
regards.
Henk
Marvin Strong
Honored Contributor

Re: Why hp apache generating logs on hpux having permissions 600 ?

What was the umask before you changed it to 022?

I would guess that the running www user process is still using the old umask. Since it already sourced it once.

Or that the umask is being set somewhere along the lines.

Shivkumar
Super Advisor

Re: Why hp apache generating logs on hpux having permissions 600 ?

Marvin; Earlier umask was 077. I changed it 022 now. The /etc/profile still has the permission as 077. I changed umask value using command line umask 022.

Thanks!!
Shiv
morganelan
Trusted Contributor

Re: Why hp apache generating logs on hpux having permissions 600 ?

I think you must add umask in /etc/profile with example adding this line to this file :
# Set umask
umask 022

After this your apache log file will be created with 644 mode.
Kamal Mirdad