Ask Your Question
0

Cannot follow symlinks, apache 403

asked 2013-02-09 14:50:54 -0600

ZibZab gravatar image

I don't know what's wrong this time. I believe I normally would use chmod o+x on the directory I wanted to access but I guess that wasn't it.

What I'm trying to do it create a symbolic link to the directory /home/matthew/public_html from /var/www/html.

I've made sure SELinux is disabled and that my httpd.conf file is accurate and allows people to follow symbolic links.

Here is an ls -l dump:

matthew@Fedora ~$ ls -l ~
total 28
drwxr-xr-x. 2 matthew matthew 4096 Feb  8 20:59 Desktop
drwxr-xr-x. 4 matthew matthew 4096 Feb  8 20:58 Documents
drwxr-xr-x. 2 matthew matthew 4096 Feb  9 13:13 Downloads
drwxr-xr-x. 2 matthew matthew 4096 Feb  8 20:49 Music
drwxr-xr-x. 4 matthew matthew 4096 Feb  8 20:58 Pictures
drwxrwxr-x  6 matthew matthew 4096 Feb  9 13:48 public_html
drwxr-xr-x. 2 matthew matthew 4096 Feb  8 20:49 Videos

Any help would be greatly appreciated, thanks.

edit retag flag offensive close merge delete

Comments

Apache does need a 'followsymlinks' directive, and you may have to change an SELinux boolean to serve files out of /home. Wouldn't it be easier to leave the files in /var/www and make "/home/matthew/publichtml" the symlink?

randomuser gravatar imagerandomuser ( 2013-02-10 15:58:06 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-08-28 02:35:31 -0600

jcubic gravatar image

updated 2017-08-28 02:42:37 -0600

You can try to add apache user to matthew grup (in /etc/group) and restart apache (you probably will need new shell before you restart apache so the groups are updated).

And as a sidenote you probably don't need to disable SELinux I have it and symlink to /home/kuba/projects in /var/www/html/ and it work just fine.

If you still have problems and have SELinux enabled you can try to enable httpd_enable_homedirs using this command:

sudo setsebool -P httpd_enable_homedirs 1
edit flag offensive delete link more
0

answered 2013-02-10 00:47:17 -0600

Remi gravatar image

updated 2013-02-10 00:47:31 -0600

check if apache can go though all directories, /home, and /home/matthew (I think default is rwx------, need rwx-----x)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-09 14:50:54 -0600

Seen: 1,041 times

Last updated: Aug 28 '17