Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

what should be the permission on httpd file

Mallikarjun B
Occasional Advisor

what should be the permission on httpd file

Hi,
I am starting to install 2 instance of apache on HPUX. but while trying to run frm normal user its showing permission denied ...nd if tried to change the permission its showing httpd not a owner.


Tx in advance.
5 REPLIES
Horia Chirculescu
Honored Contributor

Re: what should be the permission on httpd file

Hello,

>I am starting to install 2 instance of apache on HPUX.

First of all, you should configure the 2 instances to each listen on different port (let's say one on 80 another on 8080).

Regarding permissions: You should always run the httpd daemon as root user and use the
User/Group configuration directives.

You can implement also 1 virtual server, which is a better solution than running 2 instances.

Horia.
Best regards from Romania,
Horia.
Johnson Punniyalingam
Honored Contributor

Re: what should be the permission on httpd file

>>>>normal user

can you start using "root" ...? also it would be better if you could post permission

ls -l
Problems are common to all, but attitude makes the difference
Modris Bremze
Esteemed Contributor

Re: what should be the permission on httpd file

Apache is usually started with root user, but the daemon is being run with a simple user account which should be created with the Apache installation (e.g. www-data or similar). If you want to start Apache from a simple (non-root) account, one way to do this is to configure sudo. Simply changing permissions for the Apache executable will not help much in this case.
Michal Kapalka (mikap)
Honored Contributor

Re: what should be the permission on httpd file

hi,

that possible, if you create a some user, for example :

apache2

you could install a new web server under this user, if the server will have the same ip as you first web server, you need to use a different port number.

mikap
Matti_Kurkela
Honored Contributor

Re: what should be the permission on httpd file

If you configure Apache with a port number that is less than 1024, you must be root to start it. Only root can use port numbers 0 .. 1023. This is an old Unix rule.

Once Apache has started and claimed the port as root, it can then switch to a safe non-root userID. The Apache processes that actually service the clients' requests should *never* run as root.

And by the way: "install 2 instances of Apache" may mean different things.

It might mean you're trying to run 2 copies of the Apache process (obviously with different configurations, as at least the port number(s) must be different) using the same version of the Apache binary. This does not require making new copies of the Apache binary files: just start Apache twice, using the command line options to give each instance a different configuration file.

Or you might be trying to run 2 different versions of Apache simultaneously (for testing perhaps?). In this case, two Apache/httpd binaries are necessary.

MK
MK