# Problems with the symlink



## sigaretim (Sep 14, 2013)

Hi there, *I* have a problem with a symlink. I want to give `ln -s /folder1/domainname1/folder2/domainname1/public_html/symlinkedfolder` to /folder1/domainname2/folder2/domainname2/public_html/. These folders are in the /www directory, which is mounted as a partition. 

Sites works in a jail, and folder2 is the "home" directory in the jail. So, when *I* make a symlink from the /www symlink it doesn*'*t work 
	
	



```
Symbolic link not allowed or link target not accessible
```

When *I* make a link with /folder2/domainname2/public_html it works! But with /folder1/... it doesn*'*t. How to fix this problem?


----------



## jgillich (Sep 15, 2013)

You need to set the FollowSymLinks option for the directory. Also make sure that the www user (or whatever user Apache runs under) has access rights.


----------



## ShelLuser (Sep 15, 2013)

Although @jgillich is absolutely right up there you might also want to consider using SymlinksIfOwnerMatch instead. This does basically the same thing, but also checks that the owner of the symlink matches the owner of the target.

This can greatly help to enhance security because if Apache should blindly follow symlinks then it*'*s theoretically possible for people to create symlinks pointing in all sorts of wild directions.


----------

