83 lines
3.1 KiB
HTML
83 lines
3.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Virtual Services Howto: Virtual FTP</TITLE>
|
|
<LINK HREF="Virtual-Services-HOWTO-8.html" REL=next>
|
|
<LINK HREF="Virtual-Services-HOWTO-6.html" REL=previous>
|
|
<LINK HREF="Virtual-Services-HOWTO.html#toc7" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Virtual-Services-HOWTO-8.html">Next</A>
|
|
<A HREF="Virtual-Services-HOWTO-6.html">Previous</A>
|
|
<A HREF="Virtual-Services-HOWTO.html#toc7">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s7">7. Virtual FTP</A></H2>
|
|
|
|
<H2><A NAME="ss7.1">7.1 Inetd</A>
|
|
</H2>
|
|
|
|
<P>Wu-ftpd comes with built in support to make it virtual. However, you
|
|
cannot maintain separate password files for each domain. For example, if
|
|
<CODE> bob@domain1.com </CODE> and <CODE> bob@domain2.com </CODE> both want
|
|
an account you would have to make one of them bob2 or have one of
|
|
the users choose a different user name. Since you now have a virtual
|
|
filesystem for each domain you have separate password files and this
|
|
problem goes away. Just create a virtnewuser script and a virtpasswd
|
|
script in the way mentioned above and you are all set.
|
|
<P>
|
|
<P>The inetd.conf entries for wu-ftpd:
|
|
<P>
|
|
<PRE>
|
|
ftp stream tcp nowait root /usr/local/bin/virtuald \
|
|
virtuald /virtual/conf.ftp wu.ftpd -l -a
|
|
</PRE>
|
|
<P>
|
|
<H2><A NAME="ss7.2">7.2 Anonymous FTP</A>
|
|
</H2>
|
|
|
|
<P>These are unaffected by the virtuald setup. For an anonymous
|
|
user just create the FTP user in /virtual/domain1.com/etc/passwd like you
|
|
would normally.
|
|
<P>
|
|
<PRE>
|
|
ftp:x:14:50:Anonymous FTP:/var/ftp:/bin/false
|
|
</PRE>
|
|
<P>Then setup the anonymous FTP directory. You have separate password files for
|
|
each domain so you can restrict which domain has an anonymous
|
|
FTP account. Please note that since the FTP server is already <CODE> chrooted </CODE>
|
|
into the /virtual/domain1.com directory you do not have to prefix any
|
|
paths with it.
|
|
<P>
|
|
<H2><A NAME="ss7.3">7.3 Virtual FTP Users</A>
|
|
</H2>
|
|
|
|
<P>Wu-ftpd supports something called a guest group. This allows you
|
|
to create different FTP areas for each user. The FTP server does
|
|
a <CODE> chroot </CODE> to the specified area so the user cannot go
|
|
outside that directory tree. If you create the users within a
|
|
virtual domain this way they will not be able to view the
|
|
system files.
|
|
<P>
|
|
<P>Add the guest's group to the /virtual/domain1.com/etc/ftpaccess file.
|
|
<P>
|
|
<P>Create an entry in /virtual/domain1.com/etc/passwd with the <CODE> chroot </CODE>
|
|
dir and the starting home directory separated by <CODE> /./ </CODE>:
|
|
<P>
|
|
<PRE>
|
|
guest1:x:8500:51:Guest FTP:/home/g/guest1/./incoming:/bin/false
|
|
</PRE>
|
|
<P>
|
|
<P>Then setup guest's home like you would for anonymous FTP. You have separate
|
|
password files for each domain so you can specifiy which domains have guest
|
|
accounts and which users within a domain are guest users. Please note that since
|
|
the FTP server is already <CODE> chrooted </CODE> into the /virtual/domain1.com directory you do
|
|
not have to prefix any paths with it.
|
|
<P>
|
|
<HR>
|
|
<A HREF="Virtual-Services-HOWTO-8.html">Next</A>
|
|
<A HREF="Virtual-Services-HOWTO-6.html">Previous</A>
|
|
<A HREF="Virtual-Services-HOWTO.html#toc7">Contents</A>
|
|
</BODY>
|
|
</HTML>
|