Author Topic: Forbidden error in Apache -- I don't get this at all.  (Read 5023 times)

Krizdo4

  • PGP
  • Posts: 43
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #20 on: May 02, 2007, 06:58:19 PM »
I'm using /usr/sbin/apachectl restart.  Doesn't look like it has a reload option.

I'm not sure if selinux is enabled.  How do I check/configure that?

Edit: Yes.

SELINUX=enforcing
SELINUXTYPE=targeted


In that case either disable SELINUX (requires a reboot I think) or try the chcon command above.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #21 on: May 02, 2007, 07:57:28 PM »
What's the command to just check the security context?  I can't check IRC at the moment since I'm not at home.

Krizdo4

  • PGP
  • Posts: 43
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #22 on: May 02, 2007, 08:01:20 PM »
I think it's:
ls -Z

httpd_sys_content_t is what it should have at the least.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #23 on: May 02, 2007, 08:21:05 PM »
Ah-HAH.  That's it.

Code: [Select]
drwxr-xr-x  apache   admin    user_u:object_r:httpd_sys_content_t ma <=- good
drwxr-xr-x  apache   admin    user_u:object_r:user_home_t      phpMyAdmin-2.10.1-english <=- forbidden

chcon -R -h -t httpd_sys_content_t phpMyAdmin-2.10.1-english/ fixes it.  Thanks much for your help.  Now to see if I can fix these symlinks.

Krizdo4

  • PGP
  • Posts: 43
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #24 on: May 02, 2007, 08:26:47 PM »
Yay, I was useful.

edit:

Looks like http://dplogin.com/files/maps/ works too.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #25 on: May 02, 2007, 08:30:17 PM »
Yup, everything's working now except for the .htaccess file disabling fancy indexing, but I don't care at this point.  I'll just have to remember to chcon anything I upload from now on.

Krizdo4

  • PGP
  • Posts: 43
Re: Forbidden error in Apache -- I don't get this at all.
« Reply #26 on: May 02, 2007, 09:34:58 PM »
I'd say check the permissions on the .htaccess file too if you haven't already.
They'd need chcon'ing too I think.