Apache Error Client 13permission Denied Access To / Denied
Contents |
access to /~user/ denied -- SElinux? General support questions Post Reply Print view Search Advanced search apache error log permission denied 5 posts • Page 1 of 1 hm2k Posts: 24
Apache Error Client Denied By Server Configuration
Joined: 2006/08/17 10:03:24 Contact: Contact hm2k Website [SOLVED] (13)Permission denied: access to /~user/ denied --
Apache Permission Denied Access To /index.html Denied
Quote Postby hm2k » 2012/01/18 18:16:24 Hi there,I've setup a server for local development on CentOS6.I'm trying to keep it fairly secure so I'm keeping SElinux
Apache 403 Forbidden Error
enabled for now, however I seem to be having a problem.I've setup apache with UserDir public_html so I'm able to access the user's public_html directory as follows:http://server.ip/~user/This however results in:ForbiddenYou don't have permission to access /~user/ on this server.Apache Server at server.ip Port 80Checking the error log (/var/log/httpd/error_log) shows the following:[Wed Jan 13 permission denied access to index html denied 18 18:01:02 2012] [error] [client server.ip] (13)Permission denied: access to /~user/ deniedWhat I've tried:I've RTFM, specifically the apache manual suggests it's a file permissions issue...It's not a file permissions issue as the apache user can access the files of the above mentioned "user":Code: Select all[root@elite home]# su apache -s /bin/bash
bash-4.1$ cat /home/user/public_html/test.txt
Just a test.
bash-4.1$ exit
exit
This results in being able to see the contents of test.txt, so we know that's OK.I can only assume it's an SElinux issue and RTFM...Code: Select allsetsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t /home/user/public_html
Here's a bunch of other SElinux/httpd related settings I have set:Code: Select all[root@elite home]# getsebool -a | grep httpd
allow_httpd_anon_write --> on
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> on
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company apache forbidden you don't have permission to access Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags apache search permissions are missing on a component of the path Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only apache 403 client denied by server configuration takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Apache: access denied because search permissions are missing up vote http://www.centos.org/forums/viewtopic.php?t=1742 22 down vote favorite 6 I know this question is asked a lot, but the solutions I saw didn't work for me. I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document roots ServerAdmin webmaster@localhost DocumentRoot /var/www/html Alias /movies /home/username/Videos/Movies
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://serverfault.com/questions/557188/httpd-13-permission-denied-access-to-denied and policies of this site About Us Learn more about Stack Overflow http://stackoverflow.com/questions/24318618/13permission-denied-access-to-me-denied the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it permission denied works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top httpd (13) Permission denied: access to / denied up vote -1 down vote favorite My question is "How do I get my httpd to work?" Whenever I try to access my http server, I get an access denied 403 message. The denied access to message described on the subject is got on the logfile: /var/log/httpd/error_log Let me post the output of certain things first. My httpd.conf first. (the default one served via yum) http://pastebin.com/yQCr7GTz No virtual hosts whatsoever. The relevant lines from the conf are: ServerTokens OS ServerRoot "/etc/httpd" PidFile run/httpd.pid Timeout 60 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up (13)Permission denied: access to /~me denied up vote 4 down vote favorite 1 I am trying to configure Apache httpd.conf (on my CentOS 6.4) to allow access to my user directory (i.e. ~me/public_html/index.html). I changed the original httpd.conf (i.e. out-of-the-box) as follows: [root@myhost www]# diff /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig.out-of-the-box 366c366 < #UserDir disabled --- > UserDir disabled 373c373 < UserDir public_html --- > #UserDir public_html This should in principle provide access to http://myhost/~me but instead, I am getting the dreaded error: You don't have permission to access /~me on this server. I checked the file /var/log/httpd/error_log and, sure enough, it reads: (13)Permission denied: access to /~me denied The first weird thing I noticed is that a / is prepended to ~me. Where does that leading / come from? Is it only a "red herring"? Or is this pointing to the root cause of the problem (i.e. something else I need to modify in httpd.conf)? Most importantly, since I know that my ~me/public_html is has world-readable permissions, how do I troubleshoot a problem like this? Is there a way to find out why "access to /~me denied"? SELinux? httpd.conf? directory permissions? all of the above? Update 1, answering the 2 questions in the comments by @UlrichSchwarz below: The home directory does seem to have the 'x' permission: [root@myhost ~]# ls -lad /home/me drwxr-xr-x. 33 me me 4096 Feb 8 16:30 /home/me SELinux info on public_html: [root@myhost ~]# ls -Z -d /home/me/public_html/ drwxrwxr-x. me me unconfined_u:object_r:file_t:s0 /home/me/public_html/ Update 2, after I verified that this is indeed an SELinux issue (thanks to the tip by @Scolytus): I ran the command: chcon -R -t httpd_user_content_t /home/me/public_html/ Still no go. [root@myhost ~]# ls -Z -d /home/me/public_html/ drwxrwxr-x. me me unconfined_u:object_r:httpd_user_content_t:s0 /home/me/public_html/ Then I ran "Allow HTTPD to read home directories" from the command line: setsebool -P httpd_enable_homedirs=1 Still no go. /var/log/httpd/error_log now shows (in addition to the (13)permission denied error) th