Results 1 to 7 of 7

Thread: ftp folder setup

  1. #1
    Join Date
    Mar 2006
    Location
    Waaaaaaaaay too far north
    Beans
    221
    Distro
    Ubuntu 14.04 Trusty Tahr

    ftp folder setup

    Hi, Ok, bare with me

    I have forwarded port 21 from my router and created an account on dyndns.org to keep tabs on my ip address and set up a ftp server (vsftpd). I can login via ftp with filezilla using my user credentials and get access to my home directory.

    So this is good so far, but I also want to create another folder in /home (outside my user folder) called ftp for my friend to be able to download from -- while I can read/write to it. What would be a good way to only give him ftp download access to this folder while keeping him out of my user folder?

    Thanks
    I'm using ubuntu 14.04

  2. #2
    Join Date
    Mar 2006
    Location
    Waaaaaaaaay too far north
    Beans
    221
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ftp folder setup

    Bump and update:

    I tried this, but it didn't work...

    * Create a folder called 'share' in /home
    * Make myself the owner and make the group 'share'
    * Create a new user, but not allocate a home directory to the user and add him to the group 'share' -- like # useradd -M john -g share
    * Give the user john a login and password and activate the user account.

    So, after setting this up, I couldn't access 'share' via ftp login using john's credentials.
    I'm using ubuntu 14.04

  3. #3
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: ftp folder setup

    I know this doesn't answer your question but I just thought I'd point out what a bad idea it is to use FTP in this situation.

    FTP is incredibley unsecure, all of the data and the username/password are sent in plain text with no encryption, you're making it very easy for someone to hack your machine.

    I'd look into SSH instead if I were you.
    Cheesemill

  4. #4
    Join Date
    Apr 2008
    Location
    AZ
    Beans
    2,068
    Distro
    Ubuntu

    Re: ftp folder setup

    as Cheesemill suggested, rather than using ftp, use sftp and you will want to forward port 22 instead of port 21 from your router. You will want to create a new login for your friend so you dont give out your personal info. Then when you create your /home/share folder make sure that both of you have permission to read/write to it and you should be all set.

  5. #5
    Join Date
    Mar 2006
    Location
    Waaaaaaaaay too far north
    Beans
    221
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ftp folder setup

    Hi, thanks for the replies.

    So to do sftp, I open port 22 and when connecting with filezilla, use the sftp protocol?

    Is it possible to create a user without a home directory of their own?

    Thanks.
    Last edited by r3bol; January 16th, 2012 at 03:28 PM. Reason: Deleted some text that was wrong. Added another question.
    I'm using ubuntu 14.04

  6. #6
    Join Date
    Mar 2006
    Location
    Waaaaaaaaay too far north
    Beans
    221
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ftp folder setup

    Ok solved.

    The shtp over SSH was very easy to setup. The problem was the shell access I gave the user. It seems if I don't give him bash, it won't let him connect.

    With bash, he has access to folders in root which I don't want. So I'll look at solving that problem -- which shouldn't be too hard with googl
    I'm using ubuntu 14.04

  7. #7
    Join Date
    Mar 2011
    Location
    Goshen, IN
    Beans
    396
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: ftp folder setup

    set his shell to /bin/false.

    You need to make sure '/bin/false' is included in your '/etc/shells' file.
    Last edited by Derek Karpinski; January 17th, 2012 at 01:06 AM.

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
  •