1

I'm getting a 403 forbidden error when my webserver tries to load a file I created as 'root'.

If I chown and chgrp it to the right user name, it doesn't help. It also does't help if I chmod 777 the file

The only thing that works is using 'cp' while using the right user name and then deleting the original.

Any idea why?

I'm using Fedora, Apache 2. I am also using virtual hosts.

randylubin
  • 13
  • 2

1 Answers1

3

Try disabling selinux:

setenforce 0

If that works then you need to decide what you want to do permanently about selinux. On/Off. That's going to depend on where your app is used, what it does, whether it has financial value, PCI requirements and so on.

Update This is probably the most used FAQ entry:

http://docs.fedoraproject.org/en-US/Fedora/13/html/SELinux_FAQ/index.html#id4621659

Wikipedia is the place to start reading:

http://en.wikipedia.org/wiki/Security-Enhanced_Linux

There is a good FAQ on Fedora:

http://docs.fedoraproject.org/en-US/Fedora/13/html/SELinux_FAQ/

And if you are still buzzed about SELinux after all that you can spend a week with RedHat on their dedicated SELinux training course:

https://www.redhat.com/courses/rhs429_red_hat_enterprise_selinux_policy_administration/

gm3dmo
  • 10,057
  • 1
  • 42
  • 36
  • Awesome, it worked! Thank you. I know nothing about selinux... can you refer me to a good resource to study? – randylubin Feb 03 '11 at 20:58
  • I've edited the answer as per your request. Personally, I think it's worth spending some time to learn SELinux. – gm3dmo Feb 04 '11 at 09:15