Apache configuration: 403 Forbidden Permission / Document Root
I installed LAMP on Fedora 15. I tried to change the DocumentRoot
to /home/USER/www
, I changed it in the config file. Though it gave me 403 Forbidden error when i try to access the localhost
.
How can I solve this issue ?
fedora apache-http-server
add a comment |
I installed LAMP on Fedora 15. I tried to change the DocumentRoot
to /home/USER/www
, I changed it in the config file. Though it gave me 403 Forbidden error when i try to access the localhost
.
How can I solve this issue ?
fedora apache-http-server
add a comment |
I installed LAMP on Fedora 15. I tried to change the DocumentRoot
to /home/USER/www
, I changed it in the config file. Though it gave me 403 Forbidden error when i try to access the localhost
.
How can I solve this issue ?
fedora apache-http-server
I installed LAMP on Fedora 15. I tried to change the DocumentRoot
to /home/USER/www
, I changed it in the config file. Though it gave me 403 Forbidden error when i try to access the localhost
.
How can I solve this issue ?
fedora apache-http-server
fedora apache-http-server
edited Mar 23 '15 at 23:19
JakeGould
31.5k1096138
31.5k1096138
asked Aug 21 '11 at 1:19
HamzaHamza
10112
10112
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You have changed the DocumentRoot
setting but have not amended the associated <Directory>
and / or <Location>
tags in the configuration to allow access to the new location. Amend the paths within the appropriate tags and restart Apache and you'll be fine. See the Apache Manual for details.
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing<Directory>
and / or<Location>
settings too, just changing theDocumentRoot
is not enough.
– Mike Insch
Aug 21 '11 at 12:49
add a comment |
Did you make /home/USER/www/
world viewable?
If apache tries to visit your new Document Root it might not have permission to view it.
chmod 711 /home/USER
chmod 755 /home/USER/www
chmod 644 /home/USER/www/*
add a comment |
The pretty way would be to edit
/etc/httpd/conf/httpd.conf
and have apache run as user 'USER' instead of user 'apache'. Since you want to have your files there it makes sense doesn't it?
It makes more sense than fiddling with chmod permissions which might end up creating more problems than solutions. I once chmoded the /home folder recursively on an aws ec2 instance to grant permissions to apache and then could not ssh into it anymore because of wrong permissions on my keys...
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f325788%2fapache-configuration-403-forbidden-permission-document-root%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You have changed the DocumentRoot
setting but have not amended the associated <Directory>
and / or <Location>
tags in the configuration to allow access to the new location. Amend the paths within the appropriate tags and restart Apache and you'll be fine. See the Apache Manual for details.
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing<Directory>
and / or<Location>
settings too, just changing theDocumentRoot
is not enough.
– Mike Insch
Aug 21 '11 at 12:49
add a comment |
You have changed the DocumentRoot
setting but have not amended the associated <Directory>
and / or <Location>
tags in the configuration to allow access to the new location. Amend the paths within the appropriate tags and restart Apache and you'll be fine. See the Apache Manual for details.
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing<Directory>
and / or<Location>
settings too, just changing theDocumentRoot
is not enough.
– Mike Insch
Aug 21 '11 at 12:49
add a comment |
You have changed the DocumentRoot
setting but have not amended the associated <Directory>
and / or <Location>
tags in the configuration to allow access to the new location. Amend the paths within the appropriate tags and restart Apache and you'll be fine. See the Apache Manual for details.
You have changed the DocumentRoot
setting but have not amended the associated <Directory>
and / or <Location>
tags in the configuration to allow access to the new location. Amend the paths within the appropriate tags and restart Apache and you'll be fine. See the Apache Manual for details.
answered Aug 21 '11 at 2:08
Mike InschMike Insch
2,263118
2,263118
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing<Directory>
and / or<Location>
settings too, just changing theDocumentRoot
is not enough.
– Mike Insch
Aug 21 '11 at 12:49
add a comment |
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing<Directory>
and / or<Location>
settings too, just changing theDocumentRoot
is not enough.
– Mike Insch
Aug 21 '11 at 12:49
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
i changed the DocumentRoot "/home/USER/www" & restart apache but still giving the same Error
– Hamza
Aug 21 '11 at 7:10
You still need to change the existing
<Directory>
and / or <Location>
settings too, just changing the DocumentRoot
is not enough.– Mike Insch
Aug 21 '11 at 12:49
You still need to change the existing
<Directory>
and / or <Location>
settings too, just changing the DocumentRoot
is not enough.– Mike Insch
Aug 21 '11 at 12:49
add a comment |
Did you make /home/USER/www/
world viewable?
If apache tries to visit your new Document Root it might not have permission to view it.
chmod 711 /home/USER
chmod 755 /home/USER/www
chmod 644 /home/USER/www/*
add a comment |
Did you make /home/USER/www/
world viewable?
If apache tries to visit your new Document Root it might not have permission to view it.
chmod 711 /home/USER
chmod 755 /home/USER/www
chmod 644 /home/USER/www/*
add a comment |
Did you make /home/USER/www/
world viewable?
If apache tries to visit your new Document Root it might not have permission to view it.
chmod 711 /home/USER
chmod 755 /home/USER/www
chmod 644 /home/USER/www/*
Did you make /home/USER/www/
world viewable?
If apache tries to visit your new Document Root it might not have permission to view it.
chmod 711 /home/USER
chmod 755 /home/USER/www
chmod 644 /home/USER/www/*
answered Aug 21 '11 at 9:57
suwellersuweller
39726
39726
add a comment |
add a comment |
The pretty way would be to edit
/etc/httpd/conf/httpd.conf
and have apache run as user 'USER' instead of user 'apache'. Since you want to have your files there it makes sense doesn't it?
It makes more sense than fiddling with chmod permissions which might end up creating more problems than solutions. I once chmoded the /home folder recursively on an aws ec2 instance to grant permissions to apache and then could not ssh into it anymore because of wrong permissions on my keys...
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
add a comment |
The pretty way would be to edit
/etc/httpd/conf/httpd.conf
and have apache run as user 'USER' instead of user 'apache'. Since you want to have your files there it makes sense doesn't it?
It makes more sense than fiddling with chmod permissions which might end up creating more problems than solutions. I once chmoded the /home folder recursively on an aws ec2 instance to grant permissions to apache and then could not ssh into it anymore because of wrong permissions on my keys...
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
add a comment |
The pretty way would be to edit
/etc/httpd/conf/httpd.conf
and have apache run as user 'USER' instead of user 'apache'. Since you want to have your files there it makes sense doesn't it?
It makes more sense than fiddling with chmod permissions which might end up creating more problems than solutions. I once chmoded the /home folder recursively on an aws ec2 instance to grant permissions to apache and then could not ssh into it anymore because of wrong permissions on my keys...
The pretty way would be to edit
/etc/httpd/conf/httpd.conf
and have apache run as user 'USER' instead of user 'apache'. Since you want to have your files there it makes sense doesn't it?
It makes more sense than fiddling with chmod permissions which might end up creating more problems than solutions. I once chmoded the /home folder recursively on an aws ec2 instance to grant permissions to apache and then could not ssh into it anymore because of wrong permissions on my keys...
answered Mar 15 '13 at 23:42
HomezarHomezar
1012
1012
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
add a comment |
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
you point the fact of making sense, but does it have any impact globally or locally? what else does change resulting from this change? please be as clear as possible.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:09
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
Well obviously if he puts his pages in USER's directory he might as well have them executed with USER's permissions... I reckon when he does his testing he's logged in as USER as well
– Homezar
Mar 16 '13 at 0:32
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
i hope you understand its not for my sake i asked the above, but for future readers.
– Lorenzo Von Matterhorn
Mar 16 '13 at 0:33
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
:) I know, and to answer I don't see any potential downfall of this method but I might be wrong
– Homezar
Mar 16 '13 at 0:45
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f325788%2fapache-configuration-403-forbidden-permission-document-root%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown