The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Symbolic link not allowed or link target not accessible

Discussion in 'CloudLinux' started by melloman, May 18, 2016.

  1. melloman

    melloman Registered

    Joined:
    Nov 12, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    I am running WHM/cPanel with CloudLinux and have tried to setup a fairly straight forward symlink from /public_html/symtest to /public_html/images

    The symlink works perfectly when I browse to it via FTP but when I browse (in a web browser) to the directory or a file within the linked directory, I get a 403 Forbidden error.

    When I check the Apache error logs it shows the following error:
    AH00037: Symbolic link not allowed or link target not accessible: /home/*USER*/public_html/symtest


    I've checked the WHM Apache settings (Apache Configuration > Global Configuration) and have made sure FollowSymLinks is ticked.
    How can I get this Symlink to work?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    You are using cloudlinux on your server so can you please check cloudlinux symlink protection setting on your server with the following URL.

    CloudLinux Documentation
     
  3. melloman

    melloman Registered

    Joined:
    Nov 12, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Here is what I have in /etc/sysctl.conf
    # System default settings live in /usr/lib/sysctl.d/00-system.conf.
    # To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
    #
    # For more information, see sysctl.conf(5) and sysctl.d(5).

    fs.symlinkown_gid = 99
    # CageFS
    fs.proc_can_see_other_uid=0
    # SecureLinks Link Traversal Protection Allowd Group Id
    fs.protected_symlinks_allow_gid = 984
    fs.protected_hardlinks_allow_gid = 984


    I tried changing fs.proc_can_see_other_uid to 1
    I tried changing fs.protected_symlinks_allow_gid & fs.protected_hardlinks_allow_gid to 99
    I tried adding fs.enforce_symlinksifowner = 0 to the bottom of /etc/sysctl.conf

    After running sysctl -p there was no difference.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page