folder sharing with ftp

Discussion in 'Server Operation' started by rbradshaw, Sep 27, 2008.

  1. rbradshaw

    rbradshaw New Member

    when using an ftp program to connect to the server it only shows the users home directory. is it possible to have a folder which every user can access from their home directory?

    e.g. i have a folder /home/shares. can this be set up to be accessed via /home/user/shares.

    thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You can try to set up a symlink from /home/user/shares to /home/shares.
     
  3. rbradshaw

    rbradshaw New Member

    i tried a symlink but when trying to access the folder with an ftp program (i use filezilla) it says failed to retrieve directory listing but it works in the terminal. ive made sure that the user and group permisions are set to the link and folder.
     
  4. chipsafts

    chipsafts New Member

    What are you using for the ftp server?
     
  5. rbradshaw

    rbradshaw New Member

    im using proftpd
     
  6. rayit

    rayit Member

    maybe this helps??

    If you are using proftp you could change this setting

    pico /etc/proftpd.conf

    Look for this line it Locks all the users in home directory
    DefaultRoot ~

    But it's not advisable for security reasons?
    Maybe this helps you further?

    gr
    Raymond
    RayIT
     
  7. rbradshaw

    rbradshaw New Member

    thanks, but i would prefer to keep it locked to the user directory if there is another way around it.
     
  8. rayit

    rayit Member

    give it a try

    i never used it but maybe you can do following

    mount --bind olddir newdir

    so:

    cd /home/ftp
    mkdir extra
    mount --bind /otherdir extra

    to keep it after reboot add line to /etc/fstab
    /otherdir /home/ftp/extra none bind 0 0

    RayIT
     
  9. rbradshaw

    rbradshaw New Member

    which is the folder that contains the shared files and which is the folder that links to the shared files?
     
  10. rayit

    rayit Member

    cd /home/user
    mkdir shares
    mount --bind /home/shares shares

    give it atry
    but maybe this is not a good sollution if you have multi users.

    Maybe someone has a better idea?

    gr
    RaYIT
     

Share This Page