Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This is strange, but should be easy to remedy but the error only comes up when I try to access an html or php file in a directory under the root directory of var/www/html/
If I put an html file or php file in the root of html directory, and on another machine on the intranet I can access and view the file without problem. But as soon as I put the file in another directory such as var/www/html/whatever/ I get the 403 forbidden error.
I set permissions of 777 on the directory and still get this error?
I must have a config file wrong or something..... can anyone point me in the right directin please?
is it an ownership problem?
This is strange, but should be easy to remedy but the error only comes up when I try to access an html or php file in a directory under the root directory of var/www/html/
If I put an html file or php file in the root of html directory, and on another machine on the intranet I can access and view the file without problem. But as soon as I put the file in another directory such as var/www/html/whatever/ I get the 403 forbidden error.
I set permissions of 777 on the directory and still get this error?
I must have a config file wrong or something..... can anyone point me in the right directin please?
is it an ownership problem?
when you set the permissions are you doing so recursively? aka for all sub folders
-R means continue for all contained folders
try as root in a konsole
chmod -R 666 /var/www/html/*
I tried as you suggested but still getting 403 forbidden error. It seems it will not allow me to access anything in a directory, but will allow files in the root of html ?
Do you have selinux enabled? If so, that could be causing your problems. You could disable selinux temporarily by doing "setenforce=0" in a terminal. After that try accessing a webpage. If things work ok, then you need to do,
I haven't enabled it, I thinki it is part of the fedora core?
The chcon is a new command and linked to selinux?
I deleted the directory then as root created a new folder with root ownership then unpacked files into the new directory, and the error message 403 disappeared and I can read php and html files now.
who should own directories in the html directory root or apache ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.