Forum Moderators: phranque

Message Too Old, No Replies

Forbidden error

but permissions are set properly

         

mtoneil

3:37 am on Sep 12, 2005 (gmt 0)

10+ Year Member



I'm having a problem with Apache on Fedora Core 3.

When I FTP files to the server and place them in /var/www/html, I get a 403 Forbidden error when trying to access them in a browser. However, the permissions on the files are all set to 644. I also tried even 777 but still Apache will not display them.

However, if I am logged into the system and create a file manually (e.g. in emacs) in the html folder, Apache will serve the file just fine. In other words, if there are two files with identical owner, group owner, and permissions, only the one that was created while logged in at a shell will be served, but not the one that was FTP'd in. Does anyone have any ideas? This is driving me nuts.

Thanks to anyone who can offer some suggestions.

mtoneil

1:52 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



anybody? I could really use some ideas here.... =)

ikkyu

1:55 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



Are the files owned by the apache user designated in httpd.conf?

Oops - never mind - should have took the time to read the rest of the post. Maybe try scp the files over just to see what happens?

mtoneil

10:51 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



What I was doing was FTP'ing them over to a home directory, then using mv to put them in /var/www/html. But moving doesn't actually create a new file, but using cp will. And because of some security feature, apparently only files created directly inside of that directory can be accessed by Apache. So I FTP'd directly to the proper folder from root, and now it works