Internal Server Error [solved]

dan1 dan1 at edenpics.com
Tue Nov 15 07:09:38 EST 2005


>>Hello.
>>I am having a problem setting up Argus on a CentOS 4 linux box.
>>The argusd service is running properly when I type top, but when accessing 
>>the results page on the webserver on the following address 
>>http://192.168.0.1/cgi-bin/arguscgi I get the following error:
>>500 Internal Server Error
>>
>>I am using Apache/2.0.52.
>>I have already seen a post telling that this is not an argus problem but 
>>merely an apache misconfiguration, but I have checked everything in the 
>>config file and the files permissions and all seems ok.
>>
>>When I look in the apache error log I see those 3 errors:
>>ERROR: could not connect to argusd on unix socket '/var/argus/control': 
>>Permission denied
>>cannot tie auth '/var/argus/auth': Permission denied
>>Premature end of script headers: arguscgi
>>
>>I have checked the '/var/argus/control' permissions and they are as 
>>following:
>>srwxrwxrwx  1 root root      0 Nov 15 11:44 control
>>
>>I cannot change that user and group name, because it is set by the 
>>/usr/local/sbin/argusd program when we run the service. The problem 
>>probably comes from here: it sets permissions to root:root, and Apache 
>>cannot access to it.
>>Can somebody tell me how to change those permissions at the launch of the 
>>argusd service ? Also, am I doing something wrong or is there an error in 
>>the script ?
>>
>>Thank you.
>>Regards,
>>Daniel
>
>To continue debugging, I have found a way to set the proper permissions on 
>that /var/argus/control file, by inserting the following line in the 
>/usr/local/sbin/argusd file:
>chown (0, 48, '/var/argus/control');
>Just after that line:
>Control->Server::new_local( "$datadir/control", 
>oct($Conf::Config{chmod_control}) );
>
>Now, the permissions are setup properly to display root:apache, but it 
>doesn't change anything to the problem, the errors in the logs are exactly 
>the same.
>
>This itime, I wonder if there would not be a problem in the UNIX socket to 
>connect to that /var/argus/control file. Maybe Apache cannot communicate 
>with unix socket files ? Would someone know what happens and how to solve 
>that, even if it's in the apache configuration ? As it is still argus 
>related, I think that we should find out the problem, so that others might 
>also install argus and benefit from it.
>
>Regards,
>Daniel

Ok, I finally found the problem. I had SELinux enabled. If this is enabled 
then you get all those errors.
DISABLE SElinux !!
You can disable it just by edition the /etc/sysconfig/selinux file and 
changing the state to:
SELINUX=disabled
You need however to restart the linux box.
There is no need to change any permission as stated above or anything else. 
Just disable it and it's ok.
Else, you can also add seliux commands to that you have the proper rights, 
but I don't know yet how to do that and I had decided to get rid of SElinux 
due to bad experiences with strange things happening, but I had forgot this 
last box where SElinux was still enabled. It's one more bad experience with 
SElinux..
If some of you could tell what selinux command we should type to make argus 
compatible, that would be great.
Also, at least a warning in the installation documentation would be 
necessary, as all RHEL users having enabled Selinux will get that problem.

Best regards,
Daniel





More information about the Arguslist mailing list