Find the answer to your Linux question:
Results 1 to 2 of 2
I'm using Debian's proftp and would like to allow a user to access only certain directories: Namely: 1) /var/www/ and 2) /opt/myapp/ However.... It seems that I can only do ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59

    FTP directory access

    I'm using Debian's proftp and would like to allow a user to access only certain directories:

    Namely:

    1) /var/www/

    and

    2) /opt/myapp/

    However.... It seems that I can only do one or the other -- not both. /etc/proftpd/proftpd.conf is the the file that I'm supposed to edit... Now, I can do DocumentRoot /var/www or I can do DocumentRoot /opt/myapp/ but I can't do both

    What is the general practice for this? Should I create separate users? One for one directory and one for another?

  2. #2
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136

    Post

    Here is such question greatly described

    ProFTPD mini-HOWTO - Symlinks and chroot()

    The main idea is that in Unix systems you could 'mount' your directories in any point in filesystem tree. For example, you could easily mount your '/etc' directory to '/mnt/etc_dup':

    Code:
    mkdir /mnt/etc_dup
    mount --bind /etc /mnt/etc_dup
    and access your '/etc' through '/mnt/etc_dup'. Symlinks are easier to use, but not works after 'chroot' that ProFTPD uses to set DefaultRoot for user. For details see link above or file sharedsubtree.txt from kernel docs.

    http://www.kernel.org/doc/Documentat...redsubtree.txt

Posting Permissions

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