Mask's web site
作品集 | 大學回憶 | 我的家庭
我的最愛 > FreeBSD > FTP
   

This section i describe how to implement anonymous ftp server, if you want to know more detail, please man ftpd.

Anonymous Ftp

  1. Add a user named ftp to /etc/master.passwd:

    Set unused uid and gid to user ftp, this example uid and gid are 5000.
  2. # cd /usr/home/
  3. # mkdir ftp
  4. # cd ftp
  5. # mkdir bin
  6. # mkdir etc
  7. # mkdir pub
  8. # chmod 555 bin
  9. # chmod 555 etc
  10. # chmod 777 pub
  11. # cd bin
  12. # which ls
  13. # cp /bin/ls ./
  14. # chmod 111 ls
  15. # cd ..
  16. # cd etc
  17. # cp /etc/pwd.db ./
  18. # cp /etc/group ./
  19. # chmod 444 pwd.db
  20. # chmod 444 group
  21. To increase system security, only allow user ftp establish connection by ftp protocol, modify /etc/login.access:
  22. Now anonymous ftp server is done.

Note

  • To disallow someone any ftp access, add his username into /etc/ftpusers.

 

© by Mask from 2001/7.
All rights reserved.