90 likes | 216 Vues
This guide outlines the installation and configuration of FTP and Samba servers on FreeBSD. Use Pure-FTPd or ProFTPD for FTP services, implementing anonymous login and secure directory access. Users can upload and download files in designated directories, with permissions managed for virtual users. The Samba server allows Windows users to access shared directories while maintaining file permissions. Additionally, it covers ZFS file systems, including creating snapshots and rollbacks. Perfect for sysadmins or students working on system administration projects.
E N D
FTP • Install a FTP server for FreeBSD • Pure-FTPd: /usr/ports/ftp/pure-ftpd/ • ProFTPD: /usr/ports/ftp/proftpd/ • Settings • Anonymous Login • Chrooted (/home/ftp is your root directory) • Can download from /home/ftp/public • Can upload & mkdir but no download or delete from /home/ftp/upload • Hidden directory /home/ftp/hidden • There is a directory called “treasure” inside • Client can’t list in /home/ftp/hidden/ but can in hidden/treasure
FTP • Settings (cont’d) • Create a system user “sysadm” (2%) • Could login by ssh • Password is your student id • Create a virtual user “ftp-vip” • Chrooted (/home/ftp is your root directory) • Password is your student-id • Can login from 140.113.17.225 & your ip only • Full access to /home/ftp • Hidden directory is visible to ftp-vip
Samba Install Samba /usr/ports/net/samba35 Share a directory on FreeBSD as normal Windows folders Windows user can direct access (drag & drop) files on FreeBSD via 網路芳鄰, but only owner can read/write files. Admin can read/write all files .exe .bin .vbs could not upload Guest account could browse FreeBSD mount windows partition
ZFS Create a zfs file system with mirror Do zfs snapshot Do zfs rollback Set compression Reboot and everything is fine (zfs still mount)
Requirement • ZFS on /home/ftp • Samba share /home/ftp/public to windows • Mount windows directory at /home/ftp/windows
How to hand in DEMO
Deadline 2011/10/25 18:00 You do not need to submit anything
Help IRC channel #nctuNASA on freenode Newsgroup cs.course.sysadmin BBS bs2.to board CS-SysAdmin Email ta@nasa.cs.nctu.edu.tw Goto CSCC to ask professional 3F!