Symbolic link not allowed or link target not accessible
Hi
I am working with Apache CentOS 6.10 WHM and cPanel.
I have been trying to set up a symlink between accounts without success, so I decided to try a simple test symlink on the same account but had the same issues.
I have the following
httpd.conf has:
I created a 'test' directory in a public_html directory: mint2346/public_html/test Then created a symlink from the home directory:
list showing as:
If I try to access the test1 directory from ftp or a browser I get the apache error: AH00037: Symbolic link not allowed or link target not accessible: /home/mint2346/public_html/test1 Am I missing something or are there any other security options that may be stopping me access the directory? Thanks.
AllowOverride All
Options ExecCGI FollowSymLinks IncludesNOEXEC Indexes SymLinksIfOwnerMatch
I created a 'test' directory in a public_html directory: mint2346/public_html/test Then created a symlink from the home directory:
ln -s mint2346/public_html/test /home/mint2346/public_html/test1
chown -R mint2346.mint2346 test1
list showing as:
drwxr-xr-x 2 mint2346 mint2346 4096 Aug 30 10:47 test
lrwxrwxrwx 1 mint2346 mint2346 25 Aug 30 12:13 test1 -> mint2346/public_html/test
If I try to access the test1 directory from ftp or a browser I get the apache error: AH00037: Symbolic link not allowed or link target not accessible: /home/mint2346/public_html/test1 Am I missing something or are there any other security options that may be stopping me access the directory? Thanks.
-
Have you tried creating the symbolic link with the full path? /home/mint2346/public_html/test0 -
Hi thanks for the reply. That was the issue - I now have a test symlink working on the same account using: ln -s /home/mint2346/public_html/test /home/mint2346/public_html/test1
However, I have been struggling with making a symlink work between 2 cPanel accounts.ln -s /home/mint2339/public_html/newtest /home/mint2346/public_html/newtest1
I have removed SymLinksIfOwnerMatch from the config file (temporary) and there is nothing in the htaccess file. I have tried creating a new group and adding mint2339 and mint2346 to it. Various options of ownership have been tried and various permissions tried but no success. There are many different suggestions out there, but I can't find a working answer. Is there a list of requirements that I can work to in any documentation? I would prefer to keep SymLinksIfOwnerMatch if possible. Colin0 -
I didn't realize you were symlinking between separate accounts, the problem being that all scripts on a user account must be run by that user - when you symlink to another user you're running as the symlinked user but the resource/destination is owned by the other user causing an ownership/permissions issue. 0
Please sign in to leave a comment.
Comments
3 comments