Results 1 to 8 of 8

Thread: ftp server hiding files

  1. #1
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    ftp server hiding files

    Hi all
    I've been following the guide here
    https://help.ubuntu.com/12.04/server...tp-server.html
    and I'm at the point of securing the server. I was under the impression that the security settings hide the rest of the file system from a user.

    Lets say the user is user1. he has a home directory /home/user1

    I've enabled the chroot options as described in the guide but the user is still able to see, and download the entire filesystem.

    Is there a step I've missed or some permissions I need to set.

    This is on a fresh install of ubuntu server 12.04 set up (during install) as OpenSSH, and LAMP.

    How can I make it so the user sees their home directory and nothing else
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  2. #2
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ftp server hiding files

    perhaps this should better be posted in the server section, mods feel free to move it.
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  3. #3
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ftp server hiding files

    The chroot should have made the users confined to their home directories.

    Personally, I just use sftp instead of plain ftp as it is more secure and easier to manage (imo, of course).
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  4. #4
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ftp server hiding files

    Quote Originally Posted by CharlesA View Post
    The chroot should have made the users confined to their home directories.

    Personally, I just use sftp instead of plain ftp as it is more secure and easier to manage (imo, of course).
    I'm happy to use sftp, how do I configure that to only show the user the correct files
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  5. #5
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ftp server hiding files

    The best you can do is confine each user their their home directories so they cannot access another user's files. I do not believe there is a way to filter that list.

    See here:

    http://www.techrepublic.com/blog/ope...irectories/229
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #6
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ftp server hiding files

    I'd been googling and found this
    http://www.ericstockwell.com/?p=54
    with the exception of setting the home chroot directory to %h because I moved it I followed it exactly.

    Yet I was still able to see the entire file system.
    I'm using fireFTP and I had the idea to clear my browser history as FireFTP caches files.
    As soon as I connected after clearing the browser cache it displayed fine.
    I wonder if this was why I was still able to see the entire directory structure using ftps.
    I'm going to test this and then post my results
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  7. #7
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ftp server hiding files

    OK following the official vsftpd method described in the ubuntu docs here
    https://help.ubuntu.com/12.04/server...tp-server.html
    does NOT work.

    I'm more than happy using the sftp jail method described here though

    I followed the guide here
    http://www.ericstockwell.com/?p=54

    This worked perfectly once I cleared FireFTP's cache. Refreshing the browser in FireFTP does NOT work. I had to clear my entire browser history although I imagine disabling directory caching would do the job too.
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  8. #8
    Join Date
    Sep 2007
    Location
    UK
    Beans
    357
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ftp server hiding files

    I'm marking this thread as solved as it has accomplished what I set out to achieve however if anyone has any input on why the vsftpd method did not work please post. I have a vpc setup for testing so I can experiment.
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •