The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Next Previous Contents

7. Virtual FTP

7.1 Inetd

Wu-ftpd comes with built in support to make it virtual. However, you cannot maintain separate password files for each domain. For example, if [email protected] and [email protected] 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.

The inetd.conf entries for wu-ftpd:

ftp stream tcp nowait root /usr/local/bin/virtuald \
        virtuald /virtual/conf.ftp wu.ftpd -l -a

7.2 Anonymous FTP

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.

ftp:x:14:50:Anonymous FTP:/var/ftp:/bin/false

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 chrooted into the /virtual/domain1.com directory you do not have to prefix any paths with it.

7.3 Virtual FTP Users

Wu-ftpd supports something called a guest group. This allows you to create different FTP areas for each user. The FTP server does a chroot 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.

Add the guest's group to the /virtual/domain1.com/etc/ftpaccess file.

Create an entry in /virtual/domain1.com/etc/passwd with the chroot dir and the starting home directory separated by /./ :

guest1:x:8500:51:Guest FTP:/home/g/guest1/./incoming:/bin/false

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 chrooted into the /virtual/domain1.com directory you do not have to prefix any paths with it.


Next Previous Contents


Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру