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.

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:
    107
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    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.
     
  3. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    I cant move the folder outside public_html because the folder is a add on domain.
     
  4. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    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.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
  6. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
Loading...

Share This Page