“UbuntuHelp:PureFTP”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第6行: | 第6行: | ||
2. Then use your favorite text editor and open up the '''/etc/inetd.conf''' file. Comment (add a '''#''' at the start of) the line containing 'ftp' | 2. Then use your favorite text editor and open up the '''/etc/inetd.conf''' file. Comment (add a '''#''' at the start of) the line containing 'ftp' | ||
3. Again use your favorite text editor and open up the '''/etc/default/pure-ftpd-common''' file. Change '''STANDALONE_OR_INETD=inetd''' to '''STANDALONE_OR_INETD=standalone''' | 3. Again use your favorite text editor and open up the '''/etc/default/pure-ftpd-common''' file. Change '''STANDALONE_OR_INETD=inetd''' to '''STANDALONE_OR_INETD=standalone''' | ||
− | 4. Then | + | 4. Then <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo groupadd ftpgroup | sudo groupadd ftpgroup | ||
− | </nowiki></pre> and | + | </nowiki></pre> and <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser | sudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser | ||
</nowiki></pre> in the terminal. | </nowiki></pre> in the terminal. | ||
− | 5. Next create your ftpuser directory | + | 5. Next create your ftpuser directory <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo mkdir /home/ftpusers | sudo mkdir /home/ftpusers | ||
</nowiki></pre> | </nowiki></pre> | ||
− | 6. Then to create a user directory for joe | + | 6. Then to create a user directory for joe <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo mkdir /home/ftpusers/joe | sudo mkdir /home/ftpusers/joe | ||
</nowiki></pre> (you can create a directory for each ftp user) | </nowiki></pre> (you can create a directory for each ftp user) | ||
− | 7. Then to add user joe | + | 7. Then to add user joe <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe | sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe | ||
</nowiki></pre> | </nowiki></pre> | ||
− | 8. Then to create you user database | + | 8. Then to create you user database <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo pure-pw mkdb | sudo pure-pw mkdb | ||
</nowiki></pre> | </nowiki></pre> | ||
− | 9. Then | + | 9. Then <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd | sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd | ||
− | </nowiki></pre> and | + | </nowiki></pre> and <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb | sudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb | ||
− | </nowiki></pre> and | + | </nowiki></pre> and <pre><nowiki> |
− | <pre><nowiki> | + | |
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB | sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB | ||
</nowiki></pre> which will create symbolic links between the respective files. | </nowiki></pre> which will create symbolic links between the respective files. | ||
10. Then using your favorite text editor create the file '''/etc/pure-ftpd/conf/UnixAuthentication''' containing only the string '''no''' without quotes. | 10. Then using your favorite text editor create the file '''/etc/pure-ftpd/conf/UnixAuthentication''' containing only the string '''no''' without quotes. | ||
11. Next you need to modify the permissions of '''/home/ftpusers directory''' and of any other subdirectories. The owner must be '''ftpuser''' while Group must be '''ftpgroup''' | 11. Next you need to modify the permissions of '''/home/ftpusers directory''' and of any other subdirectories. The owner must be '''ftpuser''' while Group must be '''ftpgroup''' | ||
− | 12. After doing that open up pureadmin in the terminal. | + | 12. After doing that open up pureadmin in the terminal. <pre><nowiki> |
− | <pre><nowiki> | + | |
gksudo pureadmin | gksudo pureadmin | ||
</nowiki></pre> and stop firestarter if it is installed. | </nowiki></pre> and stop firestarter if it is installed. |
2007年12月6日 (四) 10:51的版本
Pure-FTPD + pureadmin (Ftp server with gui)
Install Pure-FTPD with GUI
- Install the pure-ftpd package and the pureadmin package from the Universe Repository.
2. Then use your favorite text editor and open up the /etc/inetd.conf file. Comment (add a # at the start of) the line containing 'ftp' 3. Again use your favorite text editor and open up the /etc/default/pure-ftpd-common file. Change STANDALONE_OR_INETD=inetd to STANDALONE_OR_INETD=standalone
4. Thensudo groupadd ftpgroupand
in the terminal. 5. Next create your ftpuser directorysudo useradd -g ftpgroup -d /dev/null -s /etc ftpuser
sudo mkdir /home/ftpusers6. Then to create a user directory for joe
sudo mkdir /home/ftpusers/joe(you can create a directory for each ftp user) 7. Then to add user joe
sudo pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe8. Then to create you user database
sudo pure-pw mkdb9. Then
sudo ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwdand
andsudo ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb
which will create symbolic links between the respective files.sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
10. Then using your favorite text editor create the file /etc/pure-ftpd/conf/UnixAuthentication containing only the string no without quotes. 11. Next you need to modify the permissions of /home/ftpusers directory and of any other subdirectories. The owner must be ftpuser while Group must be ftpgroup
12. After doing that open up pureadmin in the terminal.gksudo pureadminand stop firestarter if it is installed.
NOTES
The user joe is used as an example, you can change user joe and/or add or remove other users through pureadmin. Original Ubuntu Forums thread: http://ubuntuforums.org/showthread.php?t=91052