Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User Lagman's Avatar
    Join Date
    May 2006
    Posts
    2

    Default How can I make FTP accounts that are not Public?

    I've been trying to figure this out for a while but can't find anything like this in the forum yet.

    I want to create ftp accounts for users which are exclusive to them.
    In other words, I want to create an ftp account that makes their home directory a fairly protected space that no one else can see.
    The problem I'm having is that when you create an ftp account through cpanel, it does exactly what it says but places the new user's home directory in /home/accountname/public_html/ftpusername/
    This means that the directory is wide open to the public! Anyone who browses to domainname.com/ftpusername/ will see all the files they've got in their FTP home dir.

    I've tried the simlink idea but the simlink also works for the web browser so even the the physical file is elsewhere, it's still browsable anonymously via http

    Anyone have any ideas on how to make an ftp account that is just an ftp account and not exposed to the public via www.domain.com/ftpuser/ ?

    Thanks.

  2. #2
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,310
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    One simple solution is to add a blank index file to the ftp directory.

  3. #3
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,310
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Something else had forgotten about. You can chmod the permissions to 700 which should throw a 403 error when accessing via http but still allow ftp logins.

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Or you could pop a .htaccess file in the FTP user's home directory with a rule to restrict access to all files:

    Code:
    <Files ~ "*">
        Deny from all
    </Files>
    The above is just a guess, based on a current rule I have to block access to 'header.php' for a site:

    Code:
    <Files ~ "^header\.php$">
        Deny from all
    </Files>

  5. #5
    Registered User Lagman's Avatar
    Join Date
    May 2006
    Posts
    2

    Default

    Thanks.
    Both the chmod and the .htaccess file worked. Well caused apache to throw an error but would not let the contents of the ftp user directory be seen. (I haven't tried the other suggestions yet.)

    It's a shame that we don't have a more robust way to setup real ftp user accounts that are not subdirectories of ../public_html/ through cpanel though.

Similar Threads & Tags
Similar threads

  1. Public FTP
    By AtomicX in forum New User Questions
    Replies: 1
    Last Post: 11-14-2005, 06:09 AM
  2. Make Horde Public
    By qubix in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-17-2005, 04:14 AM
  3. Public FTP
    By Monil in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-10-2005, 02:31 PM
  4. public FTP?
    By jonas000 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-09-2004, 11:54 AM
  5. How to make webmail work in public Computer
    By SwanFly in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-07-2004, 11:38 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube