Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

restrict ftp access to one folder

Discussion in 'Security' started by craigedmonds, Apr 5, 2012.

  1. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have created an ftp account which allows someone access to the public_html folder.

    However, there is one folder in public_html that I DO NOT want them to access.

    Is there a way I can prevent them?

    I do have root access to server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure there is a way to do this other than the obvious, move it outside public_html until he's completed his task.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    I cant move the folder outside public_html because the folder is a add on domain.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    405
    Likes Received:
    3
    Trophy Points:
    143
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    In fact, you can move the add-on domain's folder outside public_html! Just update the new document_root in /var/cpanel/userdata/cpaneluser/addon.domain.com and rebuild apache conf. Then move the contents to the new document root and restart apache.

    Thank you,
    Nibin.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could also remove the addon domain and readd the addon domain in cPanel > Addon Domains area. You should have the option to change the folder to not use public_html for the path provided your hosting provider allows non-public_html subdomains and addon domains.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thats a good idea.

    We have around 15 web sites (all added as addon domains) and all of them are located in the /public_html/ folder (all of them also have unique ip's and ssl certs too).

    The reason we have done it like this is so that we only need to give one ftp login to the webmaster to update the sites but of course we dont want him updating one of the sites in particular and I was hoping there was some way I could just remove permissions or ban him from navigating into that particular folder.

    Looks like I will need to try one of the suggestions above.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice