Results 1 to 8 of 8

Thread: help with setting up sftp default folders.

  1. #1
    Join Date
    Aug 2010
    Beans
    81

    help with setting up sftp default folders.

    I'm a bit confused over permission and setting for this. I set up a user anonymous and I want it to go to either the /home/anonymous/Downloads/ or preferably /var/www/Downloads/

    I see a few options in the

    Subsystem sftp /usr/lib/openssh/sftp-server -d "/var/www/Downloads/"
    ChrootDirectory /var/www/Downloads/

    but noting is working, I suspect permissions.

    I also see a lot of hidden files.


    (forum wont let me attached images)

    I just want the Downloads to be accessible for download and that is all. Can anyone help me set this up?
    Last edited by ulao3; 3 Weeks Ago at 04:21 PM.

  2. #2
    Join Date
    Aug 2010
    Beans
    81

    Re: help with setting up sftp default folders.

    missing attachment.
    Attached Images Attached Images

  3. #3
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: help with setting up sftp default folders.

    I'm confused!

    What exactly do you want to go to /home/anonymous/Downloads/ or preferably /var/www/Downloads/ ?

    If you have created a new user with username anonymous it will by default create the user's home in /home/anonymous but it will not be in /home/anonymous/Downloads/.

    Tell us more about your resons for wanting the unusual setup and we may be able to help you more.

  4. #4
    Join Date
    Aug 2010
    Beans
    81

    Re: help with setting up sftp default folders.

    right, I was preferring to default to /var/www/Downloads/ but if its not possible, /home/anonymous/Downloads/ will have to do.

    I do not know what more to say? I already have my FTP files set up in /var/www/Downloads/, so it was my hope to just make an sftp and point there. but what I'm saying is, if that is not simple or possible, then I'll just move the ftp to the home directory. but I'm not able to do either. The screenshot shows shows it dumps in to /home/anonymous/ not /home/anonymous/Downloads and I see all kinds of . files. I have no idea how to set this up.

    I'd prefer the FTP to dump and restrict the user to see only
    /var/www/Downloads/

    failing the possibility of that dump to
    /home/anonymous/Downloads

  5. #5
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: help with setting up sftp default folders.

    At a guesc I think from rough memory to investigate the different results on whether or not you add closing slash .. / .. or not. Different results. I would try grsync or PuTTY as tools to test your commands in dry run mode..

  6. #6
    Join Date
    Aug 2010
    Beans
    81

    Re: help with setting up sftp default folders.

    Tried adding a /
    I get this errors when I have anything in the ChrootDirectory other then / or /home/
    Error: Network error: Software caused connection abort
    Error: Could not connect to server

    if I try /home/anonymous/ I get that error.I think its a folder permission issue.

  7. #7
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,934
    Distro
    Ubuntu

    Re: help with setting up sftp default folders.

    Try switching to internal-sftp instead of sftp-server

    Code:
    Subsystem sftp internal-sftp
    Last edited by deadflowr; 3 Weeks Ago at 06:57 AM. Reason: edit
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  8. #8
    Join Date
    Aug 2010
    Beans
    81

    Re: help with setting up sftp default folders.

    After finally getting this to nearly work I found out sftp will not work in the way I was hoping from my called application. I have to swtich over to ftp. Its a bit easier to set up but still need help, will make a new thread.

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
  •