Apache Error Client 1 13permission Denied
Contents |
access to /~user/ denied -- SElinux? General support questions Post Reply Print view Search Advanced search 5 posts • Page 1 apache error log permission denied of 1 hm2k Posts: 24 Joined: 2006/08/17 10:03:24 Contact: Contact hm2k apache error client denied by server configuration Website [SOLVED] (13)Permission denied: access to /~user/ denied -- Quote Postby hm2k » 2012/01/18 18:16:24 Hi there,I've apache 13 permission denied access to setup a server for local development on CentOS6.I'm trying to keep it fairly secure so I'm keeping SElinux enabled for now, however I seem to be having a problem.I've
Apache 403 Forbidden Error
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 18 18:01:02 2012] [error] [client server.ip] (13)Permission denied: access to /~user/ deniedWhat I've tried:I've RTFM, specifically 13 permission denied access to index html denied 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
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> on
httpd_execmem --> off
httpd_read_user_content --> on
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> o
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 apache forbidden you don't have permission to access this site About Us Learn more about Stack Overflow the company Business
403 Forbidden Apache Ubuntu
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
File Permissions Deny Server Access
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 http://www.centos.org/forums/viewtopic.php?t=1742 Apache 13 permission denied in user's home directory [closed] up vote 36 down vote favorite 9 My friend's website was working fine until he moved the document root from /var/www/xxx to /home/user/xxx. Apache gives 13 permission denied error messages when we try to access the site via a web browser. The site is configured as a virtual directory. All the Apache configurations were http://stackoverflow.com/questions/1225594/apache-13-permission-denied-in-users-home-directory unchanged (except for the directory change). We tried to chmod 777 /home/user/xxx, chown apache /home/user/xxx. But they didn't work. Is there some kind of security feature set on the user's home directories? The server OS is CentOS (Godaddy VPS). Any help is appreciated! Thanks! apache permissions share|improve this question edited Oct 15 '12 at 6:32 Santosh Kumar 5,48373175 asked Aug 4 '09 at 3:18 Dave 4,47442638 closed as off topic by Will Jan 25 '11 at 13:51 Questions on Stack Overflow are expected to relate to programming within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question. 3 Should go on serverfault. –g . Aug 4 '09 at 3:21 Didn't know about that until you mentioned it =) I guess I'll give it a go. Why they keep two (maybe more?) sites anyway? Isn't it better to centralize those categories? –Dave Au
8, 2011 by n1zyy I was just pretty stumped by the following Apache error, in /var/log/httpd/error_log: http://blogs.n1zyy.com/n1zyy/2011/12/08/stumped-by-13permission-denied-file-permissions-deny-server-access/ [Thu Dec 08 21:53:28 2011] [error] [client 192.168.1.2] (13)Permission denied: file permissions deny server access: /var/www/html/aml/i ndex.html The error implies it's a filesystem permissions issue, and the https://ubuntuforums.org/showthread.php?t=1476965 Apache site explains that it's almost always related to filesystem permissions, not Apache configuration. But this was exasperating, because the file ownership was apache.apache, and index.html was permission denied chmod 755. Apache could absolutely access it. But then the Apache docs made a passing mention that sometimes it was related to SELinux errors. Sure enough, that's exactly my problem: [matt@bos aml]$ ls -alZ drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 . drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 .. -rw-r--r--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 .htaccess drwxr-xr-x. apache apache unconfined_u:object_r:user_home_t:s0 apache error client images -rw-r--r--. apache apache unconfined_u:object_r:user_home_t:s0 index.html drwxr-xr-x. apache apache unconfined_u:object_r:user_home_t:s0 stylesheets Note that the directory, and the .htaccess file I touched, have the httpd_sys_content label, which is appropriate here. But the other files show user_home_t. This apparently precludes Apache from being able to see them. Where this went wrong is that, to get them onto the server, I scp'ed them from my desktop to my home directory on the webserver, and then cp'ed them to /var/www/html. In doing so, they picked up the user_home_t label since they were in my home directory. A quick sudo restorecon -r . got everything sorted out. There may be a more elegant way, but this worked for me. This entry was posted in Uncategorized by n1zyy. Bookmark the permalink. 30 thoughts on “Stumped by (13)Permission denied: file permissions deny server access ?” i5junkies on January 30, 2012 at 4:37 pm said: Thanks for this posting. It helped me fix the problem and running
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] Error 13: Permission denied error Apache2 Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Page 1 of 2 12 Last Jump to page: Results 1 to 10 of 11 Thread: Error 13: Permission denied error Apache2 Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode May 8th, 2010 #1 Jarige View Profile View Forum Posts Private Message Gee! These Aren't Roasted! Join Date Feb 2009 Beans 179 Error 13: Permission denied error Apache2 Hey guys, So, I wanted to setup a local Apache2 server for some programming and testing. I installed and got Apache2 working with PHP, MySQL and all works fine. Now I wanted to add an additional directory to somewhere in my /home. And that's where things went wrong. I went to edit /etc/apache2/sites-available/default. This is it: Code: