Access Denied Localhost
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
After moving my httpd directory to my new install of Fedora 27, every page (php and html) has an "Access Denied." error and every directory returns a 403. I've tried changing the permissions of the httpd directory, but it hasn't worked.
Strangely, the Fedora localhost/ default page works fine.
fedora apache-httpd
add a comment |Â
up vote
1
down vote
favorite
After moving my httpd directory to my new install of Fedora 27, every page (php and html) has an "Access Denied." error and every directory returns a 403. I've tried changing the permissions of the httpd directory, but it hasn't worked.
Strangely, the Fedora localhost/ default page works fine.
fedora apache-httpd
2
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
2
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your<directory...>
stanzas.
â ivanivan
Nov 19 '17 at 23:39
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
After moving my httpd directory to my new install of Fedora 27, every page (php and html) has an "Access Denied." error and every directory returns a 403. I've tried changing the permissions of the httpd directory, but it hasn't worked.
Strangely, the Fedora localhost/ default page works fine.
fedora apache-httpd
After moving my httpd directory to my new install of Fedora 27, every page (php and html) has an "Access Denied." error and every directory returns a 403. I've tried changing the permissions of the httpd directory, but it hasn't worked.
Strangely, the Fedora localhost/ default page works fine.
fedora apache-httpd
asked Nov 19 '17 at 23:27
John S
82
82
2
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
2
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your<directory...>
stanzas.
â ivanivan
Nov 19 '17 at 23:39
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04
add a comment |Â
2
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
2
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your<directory...>
stanzas.
â ivanivan
Nov 19 '17 at 23:39
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04
2
2
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
2
2
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your
<directory...>
stanzas.â ivanivan
Nov 19 '17 at 23:39
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your
<directory...>
stanzas.â ivanivan
Nov 19 '17 at 23:39
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Just what Jeff was mentioning above - this sounds like classic SELINUX. Anytime I install Fedora and test httpd, the main page will come up fine but attempting to move to another page will fail. What I ended up doing was changing the context by copying from a directory that would work (e.g. the default page). Here's the simple answer that I found that worked:chcon -R --reference=/var/www /path/to/webroot
And the site that I found the answer that worked (for me): Pete Freitag
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
If you (or a program) created the files in a directory with a different SELinux context, then themv
probably preserved that context, causing the issue.
â Jeff Schaller
Nov 20 '17 at 14:11
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Just what Jeff was mentioning above - this sounds like classic SELINUX. Anytime I install Fedora and test httpd, the main page will come up fine but attempting to move to another page will fail. What I ended up doing was changing the context by copying from a directory that would work (e.g. the default page). Here's the simple answer that I found that worked:chcon -R --reference=/var/www /path/to/webroot
And the site that I found the answer that worked (for me): Pete Freitag
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
If you (or a program) created the files in a directory with a different SELinux context, then themv
probably preserved that context, causing the issue.
â Jeff Schaller
Nov 20 '17 at 14:11
add a comment |Â
up vote
1
down vote
accepted
Just what Jeff was mentioning above - this sounds like classic SELINUX. Anytime I install Fedora and test httpd, the main page will come up fine but attempting to move to another page will fail. What I ended up doing was changing the context by copying from a directory that would work (e.g. the default page). Here's the simple answer that I found that worked:chcon -R --reference=/var/www /path/to/webroot
And the site that I found the answer that worked (for me): Pete Freitag
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
If you (or a program) created the files in a directory with a different SELinux context, then themv
probably preserved that context, causing the issue.
â Jeff Schaller
Nov 20 '17 at 14:11
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Just what Jeff was mentioning above - this sounds like classic SELINUX. Anytime I install Fedora and test httpd, the main page will come up fine but attempting to move to another page will fail. What I ended up doing was changing the context by copying from a directory that would work (e.g. the default page). Here's the simple answer that I found that worked:chcon -R --reference=/var/www /path/to/webroot
And the site that I found the answer that worked (for me): Pete Freitag
Just what Jeff was mentioning above - this sounds like classic SELINUX. Anytime I install Fedora and test httpd, the main page will come up fine but attempting to move to another page will fail. What I ended up doing was changing the context by copying from a directory that would work (e.g. the default page). Here's the simple answer that I found that worked:chcon -R --reference=/var/www /path/to/webroot
And the site that I found the answer that worked (for me): Pete Freitag
answered Nov 20 '17 at 2:03
Mountainerd
400111
400111
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
If you (or a program) created the files in a directory with a different SELinux context, then themv
probably preserved that context, causing the issue.
â Jeff Schaller
Nov 20 '17 at 14:11
add a comment |Â
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
If you (or a program) created the files in a directory with a different SELinux context, then themv
probably preserved that context, causing the issue.
â Jeff Schaller
Nov 20 '17 at 14:11
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
Thanks. I wonder why this happens with SELINUX, especially since both directories were made by the same installation process at the same time -- and never effected me before.
â John S
Nov 20 '17 at 2:40
1
1
If you (or a program) created the files in a directory with a different SELinux context, then the
mv
probably preserved that context, causing the issue.â Jeff Schaller
Nov 20 '17 at 14:11
If you (or a program) created the files in a directory with a different SELinux context, then the
mv
probably preserved that context, causing the issue.â Jeff Schaller
Nov 20 '17 at 14:11
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405671%2faccess-denied-localhost%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Is selinux in the picture?
â Jeff Schaller
Nov 19 '17 at 23:31
2
If you went from Apache 2.2 to 2.4 the grant permissions syntax has changed in your
<directory...>
stanzas.â ivanivan
Nov 19 '17 at 23:39
What does the error log say? What permissions do you have on the target directories and files (one or two examples will suffice)?
â roaima
Nov 20 '17 at 0:14
Thanks. I have tried changing the permissions to give every user read/write access and www ownership. SeLinux is enabled, but the troubleshooter shows no activity. I'm not sure what apache version Fedora 26 uses, but changing apache versions shouldn't have mattered much since I just moved the files within var/www/html to the new var/www/html -- the apache installation and conf files are all brand new.
â John S
Nov 20 '17 at 2:04