Re: [Proftpd-user] Setting up restricted ftp/sftp site

"John Stoffel" <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
So to follow up here, I've now got it working for $WORK, where I can
lock down customers to their own directories, and internal users are
only allowed to see those customers they have been given access to.

So all is good.  But I have a question about how I setup my various
<Directory> ... </Directory> blocks, since they're going to be the
exact same for each customer.  Here's a simple example, but I really
have three blocks for each customer, since I have to/from directories
below the user's home directory which restrict/allow where they can
put files.  So a simple example is:

    <Directory /ftp/secured/cust1>
      HideNoAccess on
      <Limit ALL>
	DenyAll
      </Limit>
      <Limit INFO REALPATH LSTAT CWD PWD LIST MLST STAT READ OPENDIR READDIR>
	AllowUser cust1
	AllowGroup cust1
      </Limit>
    </Directory>

So instead of putting in multiple blocks, can I just replace the
AllowGroup and AllowUser with a specific customer name with the %u
expression and have it do the right thing?  It would make my life so
much simpler, then I just control user/group access in the passwd and
group files.  

    <Directory ~>
      HideNoAccess on
      <Limit ALL>
	DenyAll
      </Limit>
      <Limit INFO REALPATH LSTAT CWD PWD LIST MLST STAT READ OPENDIR READDIR>
	AllowUser %u
	AllowGroup %u
      </Limit>
    </Directory>

since I don't see a %g expression anywhere outside of some certain
directives.  I just tried this, and it's not working in my quick and
dirty testing.  I was wondering what I might be missing, and maybe
asing how others handle having to add/remove directory blocks for
changes?  I can't imagine big sites with lots of users like making
changes to the core files...

Thanks,
John


_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.