• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1078
  • Last Modified:

cPanel follow symbolic link

I need a refresher. It's been years since I had a sub domain access a directory via a symbolic link.

Currently I get a 403 forbidden error.

Note: It's a dedicated server and I have root...

Here is the setup:


There is a directory called files under domain.com that I created a symbolic link under subdomain.domain.com

I can access it through SSH just fine but having trouble getting it through the browser. I am trying to avoid having to use rsync to copy the files to the multiple sub domains. Once I get it working on one then I can get it working on the 2nd, etc.

Server is WHM/cPanel
Robert Saylor
Robert Saylor
  • 2
2 Solutions
Not sure what cPanel sets permissions as, but if you create domain.com/admin2 as the domain.com account's user (via FTP or cPanel's FIle Manager), compare the permissions and ownership of the /admin and the /admin2 folder.
Robert SaylorSenior DeveloperAuthor Commented:
I resolved this.

At the file system I ran the following command:
chown -h user.group symlink

Note: doing a chown user.group does not work on symlinks. You have to pass the -h parameter.

In .htaccess I added
Options +SymLinksIfOwnerMatch

I found the answer here:

And now the file works on the subdomain. This saved me having to do a lot of un-needed deplication of images and un-needed process of sync those files to the sub domain.
Robert SaylorSenior DeveloperAuthor Commented:
I am including  RedLondon as part of the solution as it was a permission issue.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now