Http not starting, error

Hello all!

Please forgive my ignorance here - I’m an RT and Linux noob.

I made some changes to the RT code and attempted to restart httpd so I could
see the changes. When I tried to restart it failed, the httpd logs show the
following error:

[Mon May 21 08:48:56 2007] [error] Couldn’t load RT config file %s as user
root / group root.
The file is owned by user %s and group %s.
This usually means that the user/group your webserver is running as cannot
read the file.
Be careful not to make the permissions on this file too liberal, because it
contains database
passwords. You may need to put the webserver user in the appropriate group
(%s) or change
permissions be able to run succesfully ‘/etc/rt3/RT_Config.pm’
Can’t locate /etc/rt3/RT_Config.pm in @INC (@INC contains:
/usr/local/lib/rt3/lib
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /usr/lib/perl5/vendor_perl/5.8.8/RT.pm line 151.
BEGIN failed–compilation aborted at /usr/sbin/webmux.pl line 76.
Compilation failed in require at (eval 2) line 1.\n
[Mon May 21 08:48:56 2007] [error] Can’t load Perl file: /usr/sbin/webmux.pl
for server URHU19986.facstaff.ddns.marist.edu:0, exiting…
[Mon May 21 09:41:15 2007] [error] Couldn’t load RT config file %s as user
root / group root.
The file is owned by user %s and group %s.\nThis usually means that the
user/group your webserver is running as cannot read the file.
Be careful not to make the permissions on this file too liberal, because it
contains database\npasswords. You may need to put the webserver user in the
appropriate group (%s) or change\npermissions be able to run succesfully
‘/etc/rt3/RT_Config.pm’
Can’t locate /etc/rt3/RT_Config.pm in @INC (@INC contains:
/usr/local/lib/rt3/lib
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /usr/lib/perl5/vendor_perl/5.8.8/RT.pm line 151.
BEGIN failed–compilation aborted at /usr/sbin/webmux.pl line 76.
Compilation failed in require at (eval 2) line 1.

It looks like something with one of the config files but they both look okay
to me. Any suggestions? Help is greatly appreciated.

Thanks!

-Brandi L

The user and group that your webserver runs under is not able to read
your configuration files.

jbw

Brandi L wrote:

I’m running under the root user and root group. The owner is root and root
has read, write, and execute priviiedges. Everyone else has read
permissions. As far as I can tell, everything there should be okay. Could
something else be wrong here?

-Brandi LOn 5/21/07, Joby Walker joby@u.washington.edu wrote:

The user and group that your webserver runs under is not able to read
your configuration files.

jbw

Brandi L wrote:

Hello all!

Please forgive my ignorance here - I’m an RT and Linux noob.

I made some changes to the RT code and attempted to restart httpd so I
could see the changes. When I tried to restart it failed, the httpd logs
show the following error:

[Mon May 21 08:48:56 2007] [error] Couldn’t load RT config file %s as
user root / group root.
The file is owned by user %s and group %s.
This usually means that the user/group your webserver is running as
cannot read the file.
Be careful not to make the permissions on this file too liberal, because
it contains database
passwords. You may need to put the webserver user in the appropriate
group (%s) or change
permissions be able to run succesfully ‘/etc/rt3/RT_Config.pm’
Can’t locate /etc/rt3/RT_Config.pm in @INC (@INC contains:
/usr/local/lib/rt3/lib
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /usr/lib/perl5/vendor_perl/5.8.8/RT.pm line 151.
BEGIN failed–compilation aborted at /usr/sbin/webmux.pl line 76.
Compilation failed in require at (eval 2) line 1.\n
[Mon May 21 08:48:56 2007] [error] Can’t load Perl file:
/usr/sbin/webmux.pl for server URHU19986.facstaff.ddns.marist.edu:0
http://URHU19986.facstaff.ddns.marist.edu:0, exiting…
[Mon May 21 09:41:15 2007] [error] Couldn’t load RT config file %s as
user root / group root.
The file is owned by user %s and group %s.\nThis usually means that the
user/group your webserver is running as cannot read the file.
Be careful not to make the permissions on this file too liberal, because
it contains database\npasswords. You may need to put the webserver user
in the appropriate group (%s) or change\npermissions be able to run
succesfully ‘/etc/rt3/RT_Config.pm’
Can’t locate /etc/rt3/RT_Config.pm in @INC (@INC contains:
/usr/local/lib/rt3/lib
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /usr/lib/perl5/vendor_perl/5.8.8/RT.pm line 151.
BEGIN failed–compilation aborted at /usr/sbin/webmux.pl line 76.
Compilation failed in require at (eval 2) line 1.

It looks like something with one of the config files but they both look
okay to me. Any suggestions? Help is greatly appreciated.

Thanks!

-Brandi L



List info:
The rt-devel Archives

I’m running under the root user and root group. The owner is root
and root has read, write, and execute priviiedges. Everyone else
has read permissions. As far as I can tell, everything there should
be okay. Could something else be wrong here?

Well, that’s a mistake for starters. Your web server must never
run as root (imagine what would happen if someone found a weakness in
a web-form on your web server, which caused the web-server to do
something it shouldn’t - if it’s running as root, it’s game over and
the attacker can do anything they like. If it’s running as a non-
privileged user, the worst they can do, without a great deal more
effort, is damage files belonging to that non-privileged user.)

In fact, you’re probably getting this error because your web server
almost certainly isn’t running as root, but running as some other
user, and that user can’t read your root-owned web files.

Which version of Linux are you running this on? Debian (and
presumably Ubuntu) run their web server as user www-data, typically.
I don’t know what Red Hat et al do.

Tim