#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2

    FTP client default directory


    Hi all,

    Sorry for a dumbass question....

    Using SSH, my Debian user mary has read and write permissions for the directory /var/www/vhosts/example.com/httpdocs but in the Filezilla client (in Windows 7) she is stuck inside /home/mary and can't get outside this directory. In Filezilla site manager / advanced I tried putting /var/www/vhosts/example.com/httpdocs as the remote default folder but it seems to make no difference. I tried in Cyberduck but got the same result.

    Can anyone please tell me how I can allow this user to get into other directories such as /var/www/vhosts/example.com/httpdocs in Filezilla?


    Thanks...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    875
    Rep Power
    275
    You need to find out which FTP server is installed on Debian (proftpd, pureftp, vsftpd, etc...) and configure a new share for Mary for the DIRECTORY that you want her to have access to in its config.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by DonR
    You need to find out which FTP server is installed on Debian (proftpd, pureftp, vsftpd, etc...) and configure a new share for Mary for the DIRECTORY that you want her to have access to in its config.
    OK thanks - so I think I need to edit proftpd.conf - I am trying to work it out from here http://www.proftpd.org/docs/howto/ConfigFile.html or any suggestions please

    Code:
    $ proftpd -v
    ProFTPD Version 1.3.2e
    
    
    $ cat /etc/proftpd.conf
    #
    # To have more informations about Proftpd configuration
    # look at : http://www.proftpd.org/
    #
    
    # This is a basic ProFTPD configuration file (rename it to
    # 'proftpd.conf' for actual use.  It establishes a single server
    # and a single anonymous login.  It assumes that you have a user/group
    # "nobody" and "ftp" for normal operation and anon.
    
    ServerName                      "ProFTPD"
    #ServerType                     standalone
    ServerType                      inetd
    DefaultServer                   on
    <Global>
    DefaultRoot     ~               psacln
    AllowOverwrite          on
    </Global>
    DefaultTransferMode     binary
    UseFtpUsers                     on
    
    TimesGMT                        off
    SetEnv TZ :/etc/localtime
    # Port 21 is the standard FTP port.
    Port                            21
    # Umask 022 is a good standard umask to prevent new dirs and files
    # from being group and world writable.
    Umask                           022
    
    # To prevent DoS attacks, set the maximum number of child processes
    # to 30.  If you need to allow more than 30 concurrent connections
    # at once, simply increase this value.  Note that this ONLY works
    # in standalone mode, in inetd mode you should use an inetd server
    # that allows you to limit maximum number of processes per service
    # (such as xinetd)
    MaxInstances                    30
    
    #Following part of this config file were generate by PSA automatically
    #Any changes in this part will be overwritten by next manipulation
    #with Anonymous FTP feature in PSA control panel.
    
    #Include directive should point to place where FTP Virtual Hosts configurations
    #preserved
    
    ScoreboardFile /var/run/proftpd_scoreboard
    
    # Primary log file mest be outside of system logrotate province
    
    TransferLog /opt/psa/var/log/xferlog
    
    #Change default group for new files and directories in vhosts dir to psacln
    
    <Directory /var/www/vhosts>
            GroupOwner      psacln
    </Directory>
    
    # Enable PAM authentication
    AuthPAM on
    AuthPAMConfig proftpd
    
    IdentLookups off
    UseReverseDNS off
    
    AuthGroupFile   /etc/group
    
    Include /etc/proftpd.include
    $
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    875
    Rep Power
    275
    If you don't really care where any of your FTP users are going, and want them to have access to any DIRECTORY on your Dbian install, then, just comment out the "DefaultRoot" line...like this.
    Code:
    <Global>
    #DefaultRoot     ~               psacln
    AllowOverwrite          on
    </Global>
    Another way to go about it [if the above isn't exactly what you're after] is to add Mary to the www-data group [or whatever group ApacheWebServer is running on], using commandline
    Code:
    usermod -a -G www-data mary
    and then, above the existing DefaultRoot line in proftpd.conf change your existing DefaultRoot like so.
    Code:
    <Global>
    DefaultRoot    /var/www     www-data
    DefaultRoot     ~               psacln
    AllowOverwrite          on
    </Global>
    Then, since Mary will be a member of www-data, Mary should be taken directly to /var/www when logged into Proftpd server.
    [I think that's all correct.]
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by DonR
    Then, since Mary will be a member of www-data, Mary should be taken directly to /var/www when logged into Proftpd server.
    [I think that's all correct.]
    Yes that works thank you

IMN logo majestic logo threadwatch logo seochat tools logo