linux ftp服务器配置实验报告
- 格式:doc
- 大小:93.00 KB
- 文档页数:8
(2010~2011学年度第2学期)课程名称Linux题目Ftp服务器搭建1.实验目的及要求a.理解并掌握Linux网络系统下FtpServer的搭建方法b.学习并熟练掌握运用Ftp和一些相关命令,及在pc机和虚拟机间传送文件c.要求:用户名为自己的名字jiangxiaorong,密码是学号200844402052.实验软硬件环境软件环境:linux虚拟机 window7 系统 Red Hat linux 硬件环境:pc机3.实验内容a.创建管理员用户b.查看当前系统是否安装了VSFtpd:c.安装RPM包:1. # rpm –ivh RPM包的全路径文件名i:代表安装。
v:代表verbose,设置在安装过程中将显示详细的信息。
h:代表hash,设置在安装过程中将显示“# ”来表示安装的进度。
2.安装rpm3.测试成功,已安装ftp4.安装rpm文件包其中,cdrom是包含这些的一个文件5.安装完成d.VSFtpd的配置文件:(1)/etc/vsftpd/vsftpd.conf vsftpd的主配置文件(2)/etc/vsftpd.ftpusers指定哪些用户不能访问ftp服务器(3)/etc/er_list当/etc/vsftpd/vsftpd.conf中设置了userlist_enable=yesuserlist_deny=no时,仅仅允许/etc/er_list中指定的用户访问ftp服务器。
e.启动VSFtpdf.用ifconfig配置ip地址,同时激活设备# ifconfig [设备名]ip地址 netmask 子网掩码 [up]使用ifconfig命令可以判断以太网是否启动并正在运转。
ifconfig命令用到的执行参数可以没有,也可有一个网络接口的名字、一个IP地址以及其他参数选项。
ifconfig命令会把一个IP地址分配给一个网络接口,然后,用户的系统就会知道存在着这样一个网络接口。
LINUX的FTP实验报告实验需求:为了实现文件传输,共享资源实验环境:一台centos和一台XP客户机实验步骤:首先打开centos再将安装光盘挂载上,输入命令“rpm -qa|grep vsftpd”查看是否有此软件,如果没有进入到光盘的挂载目录,然后输入命令“rpm -ivh vsftpd(然后使用补全)”,如图1所示,安装软件完成图1下面我们到配置文件中设置一下,输入命令“vi /etc/vsftpd/vsftpd.conf”就出现如图2所示,用末行模式加上行号图2我们将文件中的第27和31行启用,就是把前面的#删除即可,然后在31行下面写上“anon_other_write_enable=YES”这一行的意思是给匿名用户删除权限,第27行是给匿名用户上传权限,31行是给匿名用户创建、修改文件夹权限,如图3所示,修改完成后保存退出图3然后我们再到“/var/ftp/”下将pub文件夹的其它用户权限设为读、写、执行,输入命令“chmod o+w pub”如图4所示图4下面我们将两台虚拟机网段设置成3,将centos的IP设置为192.168.6.2 将XP的IP设置为192.168.6.3,如图5-1,5-2所示,都点击确定完成设置图5-1图5-2然后我们在XP上测试一下网络是否畅通,如图6所示网络畅通图6 下面我们到centos上启动FTP服务,输入命令“service vsftpd restart”,,我们启动成功,下面我们到XP上测试,我们的设置是否生效,如图7所示,我们访问成功图7 我们测试一下上传和删除功能,如图8-1,8-2所示,设置生效,我们实验成功图8-1图8-2总结:此次实验,让我学到FTP功能也是很强大的,如果不小心就会让其不能实验你想要的功能,我在删除文件夹的时候,因为忘记了文件夹有内容,所以怎么也删除不掉,后来将文件一删除就把问题解决了附加内容:解释一下配置文件中的选项意思,如图#vi /etc/vsftpd/vsftpd.conf 允许匿名用户登录anonymous_enable=YES 允许本地用户登录local_enable=YES开放本地用户的写权限write_enable=YES设置本地用户的文件掩码local_umask=022匿名用户上传文件anon_upload_enable=YES 匿名用户创建文件夹权限精选文库anon_mkdir_write_enable=YES匿名用户删除权限anon_other_write_enable=YES切换目录时显示的消息dirmessage_enable=YES开启日志功能xferlog_enable=YES标准数据传输端口connect_from_port_20=YES上传文件时改变文件的所有者chown_uploads=YESchown_username=whoever日志文件的路径xferlog_file=/var/log/vsftpd.log使用标准的日志格式xferlog_std_format=YES会话超时600秒自动中断连接idle_session_timeout=600数据连接超时120秒中断连接data_connection_timeout=120设置客户端空闲时的自动中断和激活连接的时间accept_timeout=60connect_timeout=60精选文库限制客户并发连接数max_clients=200设置每客户的连接数max_per_ip=5设置传输速率local_max_rate=50000anon_max_rate=50000guest_max_rate=50000开启ASCII码上传、下载方式ascii_upload_enable=YESascii_download_enable=YESFTP欢迎信息ftpd_banner=Welcome to blah FTP service.设置chroot第一种:所有用户都锁定目录chroot_local_user=YES第二种:只有文件里的用户才会锁定目录chroot_local_user=NOchroot_list_enable=YESchroot_list_file=/etc/vsftpd.chroot_list限制本地用户的访问精选文库第一种:设置文件里的本地用户不能访问FTP服务器userlist_enable=YESuserlist_deny=YESuserlist_file=/etc/er_list第二种:设置只有文件里的本地用户才能访问FTP服务器userlist_enable=YESuserlist_deny=NOuserlist_file=/etc/er_list另外:/etc/vsftpd.ftpusers只要是这个文件里的用户都不能访问服务器vsftp服务器参数怎样配置#################用户登陆控制###############接受匿名用户anonymous_enable=YES#匿名用户login时不询问口令no_anon_password=YES#匿名用户主目录anon_root=(none)#接受本地用户local_enable=YES#本地用户主目录local_root=(none)#如果匿名用户需要密码,那么使用banned_email_file里面的电子邮件地址的用户不能登录deny_email_enable=YES#仅在没有pam验证版本时有用,是否检查用户有一个有效的shell来登录check_shell=YES#若启用此选项,userlist_deny选项才被启动userlist_enable=YES#若为YES,则userlist_file中的用户将不能登录,为NO则只有userlist_file的用户可以登录userlist_deny=NO#如果和chroot_local_user一起开启,那么用户锁定的目录来自/etc/passwd每个用户指定的目录(这个不是很清楚,很哪位熟悉的指点一下)passwd_chroot_enable=NO#定义匿名登入的使用者名称。
实训2使用Linux搭建FTP服务器实训报告1. 实验目的本实训的目的是通过在Linux系统上搭建FTP服务器,了解和掌握FTP协议以及服务器的基本配置和使用方法。
2. 实验环境本次实训使用的实验环境如下:- 操作系统:Linux- 软件:vsftpd3. 实验步骤3.1 安装vsftpd软件在Linux系统上,通过包管理工具安装vsftpd软件。
具体步骤如下:- 打开终端。
- 输入以下命令进行安装:sudo apt-get install vsftpd- 等待安装完成。
3.2 配置vsftpd安装完成后,需要进行一些配置才能正常使用vsftpd。
具体步骤如下:- 进入vsftpd配置文件所在的目录。
一般位于`/etc`目录下。
- 使用文本编辑器打开文件`vsftpd.conf`。
- 根据需求修改配置项,如FTP根目录、允许匿名访问等。
保存修改后关闭文件。
- 重启vsftpd服务,使配置生效。
3.3 创建FTP用户在FTP服务器上创建用户,以便其他用户可以通过FTP协议访问服务器。
具体步骤如下:- 打开终端。
- 输入以下命令创建新用户:sudo adduser ftpuser- 根据提示设置用户密码等信息。
3.4 测试FTP服务器完成以上配置后,可以进行简单的测试,确保FTP服务器可以正常使用。
具体步骤如下:- 打开FTP客户端软件。
- 输入服务器地址、FTP用户和密码进行连接。
4. 实验结果5. 实验总结注意:本文档内容仅供参考,具体配置和操作可能因不同的Linux发行版和软件版本略有不同,建议在实际操作过程中参考相关文档和官方说明。
Linux网络管理实训报告学生姓名:李含指导教师:刘国成班级: C0841学号: 36信息工程学院2011.11一、Linux安装与配置1、实训目的(1)熟练掌握Linux安装的方法(2)了解Linux的基本配置2、实训内容(1)安装带图形界面的Linux redhat 5.2企业版Linux用户和计算机(2)安装命令行界面Linux redhat 5.2企业版LinuxHLG-B (3)使用ssh putty连接到Linux(4)管理文件及目录3、实训步骤命令行安装RedHat(1)在vmvare安装虚拟机时,在选择操作系统该步骤时,一定选择Linux(2)新建完vitual machine 界面如下(3)打开vmware ,在vmware 光驱中挂载linux RedHat 企业版(4) 从光盘引导启动linux,启动vmare(5) 在命令行中键入text(6) 在光盘检测的页面,用tab 键选择Skip 跳过光盘检测。
(7) 再接下的界面中,直接点击OK 即可。
(8) 语言选择英语(注:这里选择英语,不要选择chinese )(9) 键盘使用习惯,默认即可。
点击OK(11)在弹出的页面中,点击yes。
FAT32,选择默认即可,点击ok。
(13) 在该页面可以看到默认的分区信息,可以根据自己对分区的要求对分区信息进行修改。
(14) 是否给GRUB 开机管理系统设定密码,根据个人安全需要选择。
(15) 在该页面选择使用IPv4 还是IPV6。
我们选择IPV4(16)在该页面,选择动态获得IP 地址,如后续需要指定,我们进行设定。
(17) 为服务器指定名称,方便其他人在网络上查找(18) 为系统指定时区(19) 设定root 密码(20) 安装完成后,需要重新启动机器。
4、实训小结通过对Linux安装与配置的实训,虽然时间很短,但我学到了很多,在与老师和同学们的相处下,我不仅学到了很多理论知识,我还学会了许多做人的道理,在实训期间,我才发现我的理论知识还不是很扎实,遇到的许多问题我都不知所措,还好有老师和同学帮助我,我才得以度过难关,在此,我要感谢那些帮助过我的老师和同学。
Vsftpd实验报告1.实验环境:Vm(ftp服务器):192.168.10.1物理机(客户机):192.168.10.42.实验要求:学校有Linux服务器做为FTP服务器有两个班,分别是wl28和wl29现要求,wl28班的人和wl29班的人都能够使用自己的账号wl28或wl29,密码123登录FTP 登录上后能看到自己的文件夹,在文件夹中只能上传,不能下载(且有文件类型的要求)3.实验步骤:服务器1)挂光盘。
装包mount /dev/cdrom /mntrpm -ivh vsftpd…2)更改主配置文件vim /etc/vsftpd/vsftpd.confchroot_local_user=YES//强制用户在自己的家里边guest_enable=YES //开启来宾账户guest_username=virtual//来宾映射成virtual用户pam_service_name=ftp.virtual //身份验证文件anon_world_readable_only=NO //列出文件夹中文件user_config_dir=/etc/vsftpd/vsftpd_user_conf //用户配置文件目录设置3)创建一个用来做为来宾的用户useradd -d /home/ftpsite virtual4)创建身份验证文件(基数行是用户名,偶数行是密码)vim login.txtwl28123Wl291235)把login.txt 转换为 login.db(因为db_load默认没有安装,所以要先安装包rpm -ivh db4-utils) db_load -T -t hash -f login.txt /etc/vsftpd/login.db6)创建身份验证模块,把主配置文件和用户数据库关联起来vim /etc/pam.d/ftp.virtualAuth required /lib/security/pam_userdb.so db=/etc/vsftpd/loginAccount required /lib/security/pam_userdb.so db=/etc/vsftpd/login7)创建用户配置文件所在目录mkdir /etc/vsftpd/vsftpd_user_conf8)建立用户配置文件vim /etc/vsftpd/vsftpd_user_conf/wl28local_root=/home/ftpsite/wl28 //用户ftp站点目录anon_upload_enable=YES //用户可上传文件anon_mkdir_write_enable=NO //用户无建立、删除目录的权限anon_other_write_enable=NO //用户无对文件改名删除和覆盖文件的权限deny_file={*.mp3,*.mid,*.wav,*.mp4,*.3gp,*.avi ,*.flv,*.rmvb,*.qvod,*.rm,*.rar,*.zip,*.exe,*. bat,*.vbs,*.vod}//用户无法上传括号中的文件download_enable=NO //用户无法下载文件vim /etc/vsftpd/vsftpd_user_conf/wl29local_root=/home/ftpsite/wl29 //用户ftp站点目录anon_upload_enable=YES //用户可上传文件anon_mkdir_write_enable=NO//用户无建立、删除目录的权限anon_other_write_enable=NO //用户无对文件改名删除和覆盖文件的权限deny_file={*.mp3,*.mid,*.wav,*.mp4,*.3gp,*.avi ,*.flv,*.rmvb,*.qvod,*.rm,*.rar,*.zip,*.exe,*. bat,*.vbs,*.vod}//用户无法上传括号中的文件download_enable=NO //用户无法下载文件9)创建用户目录mkdir /home/ftpsite/wl28mkdir /home/ftpsite/wl2910)在其中建立新人员cd /etc/vsftpd/vsftpd_user_conf/wl28mkdir xzlcd /etc/vsftpd/vsftpd_user_conf/wl29mkdir xzl11)改变属组、属主chown -R virtual:virtual /home/ftpsite/wl28chown -R virtual:virtual /home/ftpsite/wl29客户机用浏览器检测ftp://192.168.10.1用不同的身份登录,上传下载文件,进行验证实验总结:通过权限设置,可以不同用户在ftp上的权限,便于管理。
云南大学软件学院实验报告课程:网络操作系统分析与实现任课教师:梁宇实验指导教师(签名):实验6 FTP服务器及数据库服务器的配置一、实验目标:1. 了解在Linux下配置FTP所需要环境和资源。
2. 掌握Linux下配置FTP服务器的方法。
3. 能够按照实际情况修改FTP的配置文件。
4. 熟悉常用的FTP基本内部命令。
二、实验要求采用主机操作系统和VMware客户操作系统,两部分为一组进行FTP的配置。
客户操作系统作为FTP服务器,主机操作系统作为FTP客户机。
三、实验内容按照下面的要求进行配置,并记录实验过程和结果。
(一)、安装vsftp软件1、如果已经将Red Hat Linux 9.0进行完全安装,则FTP服务器软件已经安装。
如果没有安装,可以从Red Hat Linux 9.0的第一张安装盘里找到对应的RPM软件包进行安装。
//安装vsftpd:rpm -ivh vsftpd-1.1.3.i386.rpm//查看是否安装了vsftpd:#rpm -qa|grep vsftpd//启动vsftpd:service vsftpd start//检查是否启动:pstree | grep vsftpd2、VSFTP的主配置文件:/etc/vsftpd/vsftpd.conf,以及/etc/vsftpd.ftpusers和/etc/er_list文件。
/etc/vsftpd.ftpuser中指定不能访问FTP服务器的用户,/etc/er_list中指定用户在默认情况(即在/etc/vsftpd/vsftpd.conf中设置了userlist_deny=YES)下不能访问FTP服务器。
当在/etc/vsftpd/vsftpd.conf中设置userlist_deny=NO时,仅允许/etc/er_list中指定的用户访问FTP服务器。
(二)、配置FTP服务器的属性1. 在Linux 环境下使用的FTP服务器软件主要有Wu-ftpd、vsftpd和ProFTPd三种,本机上使用的是哪一种?它的守护进程是什么?Vsftp,其守护进程为vsftpd2. 在FTP服务器上创建本地用户wangming,liping;3. 在FTP服务器上禁止liping使用FTP功能,应该如何操作?在/etc/ftpusers中添加liping。
Linux实验报告
姓名学号班级成绩
实验名称: Linux-FTP服务器配日期
一、实验目的:
●掌握Vsftpd服务器的配置方法。
●熟悉FTP客户端工具的使用。
●掌握常见的FTP服务器的故障排除。
二、实验内容:
练习Linux系统下Vsftpd服务器的配置方法及FTP客户端工具的使用。
三、实验记录:
○1修改本地权限,使匿名用户对/var/ftp目录具有写入权限
○2修改配置文件
○3设置禁止本地user1用户登入ftp服务器
○4设置只有指定本地用户user1和user2可以访问ftp服务器
○5设置将所有本地用户都锁定在家目录中
○6设置本地用户登录FTP服务器之后,在进入dir目录时显示提示信息“welcome”
四、思考题:
FTP的配置过程:基本的过程就是修改方/etc/vsftpd/ftpusers 中的VSFTPD.CONF的配置文件中的属性,如userlist_enable等,然后添加访问的用户名称到/etc/vsftpd/ftpusers 中的用户列表,这样该用户便可以反问该ftp。
五、评语:。
linux ftp实验报告Linux FTP实验报告一、引言FTP(File Transfer Protocol)是一种用于在网络上进行文件传输的协议。
在Linux系统中,FTP是一个非常常用的工具,通过FTP可以实现在本地与远程服务器之间进行文件的上传和下载。
本实验旨在通过使用Linux系统自带的FTP工具,掌握FTP的基本使用方法,并对其进行一些实际操作。
二、实验环境本次实验使用的实验环境为Ubuntu 20.04 LTS操作系统,FTP服务器为vsftpd。
三、实验步骤1. 安装FTP服务器在Linux系统中,我们可以通过以下命令安装vsftpd FTP服务器:```sudo apt-get install vsftpd```安装完成后,FTP服务器会自动启动。
2. 修改FTP服务器配置FTP服务器的配置文件位于/etc/vsftpd.conf。
我们可以使用文本编辑器(如vi)打开该文件,根据需要进行一些配置修改。
例如,可以修改匿名用户的访问权限,设置上传和下载的速度限制等。
3. 启动FTP服务在修改完配置文件后,我们需要重启FTP服务使配置生效。
可以使用以下命令启动或重启FTP服务:```sudo service vsftpd restart```4. 连接FTP服务器在本地终端中,我们可以使用`ftp`命令连接到FTP服务器。
例如,要连接到IP地址为192.168.1.100的FTP服务器,可以使用以下命令:```ftp 192.168.1.100```输入用户名和密码,即可成功连接到FTP服务器。
5. 上传文件连接成功后,我们可以使用`put`命令将本地文件上传到FTP服务器。
例如,要将本地文件localfile.txt上传到FTP服务器,可以使用以下命令:```put localfile.txt```上传完成后,可以使用`ls`命令查看FTP服务器上的文件列表,确认文件已成功上传。
linux服务项目报告姓名:李嘉猛班级:计算机网络2班学号:30号配置FTP服务器项目报告1、项目需求配置一个高安全级别的匿名FTP服务器,实现功能:2、项目方案仅仅允许匿名用户访问不允许本地用户访问关闭所有写权限,不允许匿名用户上传设置匿名用户最大传输速率设置最大并发连接数,配置每个主机的最大连接数3、项目环境准备软件要求:虚拟机,linux系统光盘。
操作系统:RED HAT 5.0本机IP地址:10.129.33.100服务所需的安装包:配置文件:/etc/vsftpd/vsftpd.conf4、项目实施步骤(1).检查FTP软件安装包是否安装,完成安装。
(2).配置/etc/vsftpd/vsftpd.conf文件。
修改一下内容:Anonymous_enable=YES 允许匿名用户访问Localhost_enable=NO 禁止本地用户访问Write_enable=NO 关闭所有写权限Anon_upload_enable=NO 匿名用户无法上传max_per_ip=5 每个ip最多支持5个连接max_clients=10 最大连接数为10anony_max_rate=30000 限制匿名用户的最大传输速率为30kb(3)为满足实验需求,创建一个本地用户:(4).重启ftp服务:Service vsftp restart(5).在windows主机上进行测试:1.进行本地用户访问的测试:成功!2.匿名用户访问:成功!3.关闭所有写权限,不允许匿名用户上传如上所述,匿名用户无法写入。
匿名用户可下载不可上传!5、项目测试项目总结嗯嗯。
很简单、、、。
linux ftp服务器配置实验报告linux服务姓名: 李嘉猛班级:计算机网络2班学号: 30号with the supervising engineer in the construction process, strictly in accordance with the owner and engineer for construction approval of construction organization design and quality control. In the team of "self-inspection, mutual inspection, handover inspection" and mass spot check on the basis of the technology sector, initiative to accept supervision engineers, tianjing quality supervision and quality supervision station of Beijing railway administration supervision and inspection, with the supervising engineer for good construction quality inspection and supervision engineer's request for rectification, and ensure the timely completion of construction quality. 4, with the coordination of railway-related units to give full play of my units in railway construction experience, familiar with the advantages ofexisting procedures relating to the construction, active railway-related functions, contact the facilities management unit, comply with the relevant provisions of existing line construction, signed before construction to maintain existing equipment security operations and ensure the safety of construction match the custody agreement, and implementation in the construction process. 5, coordination with localgovernments, transportation agencies actively contact with local governments, transportation, environmental protection and other sectors, actively seeking the cooperation and support of the local government sector, with local governments and make the construction of law and order in the region, environmental protection, ensure配置FTP服务器项目报告1、项目需求配置一个高安全级别的匿名FTP服务器,实现功能: 2、项目方案仅仅允许匿名用户访问不允许本地用户访问关闭所有写权限,不允许匿名用户上传设置匿名用户最大传输速率设置最大并发连接数,配置每个主机的最大连接数 3、项目环境准备软件要求:虚拟机,linux系统光盘。
操作系统:RED HAT 5.0本机IP地址:10.129.33.100服务所需的安装包:配置文件:/etc/vsftpd/vsftpd.conf4、项目实施步骤(1).检查FTP软件安装包是否安装,完成安装。
with the supervising engineer in the construction process, strictly in accordance with the owner and engineer for construction approval of construction organization design and quality control. In the team of"self-inspection, mutual inspection, handover inspection" and mass spot check on the basis of the technology sector, initiative to accept supervision engineers, tianjing quality supervision and quality supervision station of Beijing railway administration supervision and inspection, with the supervising engineer for good construction quality inspection and supervision engineer's request for rectification, and ensure the timely completion of construction quality. 4, with the coordination of railway-related units to give full play of my units in railway construction experience, familiar with the advantages ofexisting procedures relating to the construction, active railway-related functions, contact the facilities management unit, comply with the relevant provisions of existing line construction, signed before construction to maintain existing equipment security operations and ensure the safety of construction match the custody agreement, and implementation in the construction process. 5, coordination with local governments, transportation agencies actively contact with local governments, transportation, environmental protection and other sectors, actively seeking the cooperation and support of the local government sector, with local governments and make the construction of law and order in the region, environmental protection, ensure(2).配置/etc/vsftpd/vsftpd.conf文件。
修改一下内容:Anonymous_enable=YES 允许匿名用户访问Localhost_enable=NO 禁止本地用户访问Write_enable=NO 关闭所有写权限Anon_upload_enable=NO 匿名用户无法上传max_per_ip=5 每个ip最多支持5个连接max_clients=10 最大连接数为10anony_max_rate=30000 限制匿名用户的最大传输速率为30kb(3)为满足实验需求,创建一个本地用户:(4).重启ftp服务:Service vsftp restart(5).在windows主机上进行测试:1.进行本地用户访问的测试:with the supervising engineer in the construction process, strictly in accordance with the owner and engineer for construction approval of construction organization design and quality control. In the team of "self-inspection, mutual inspection, handover inspection" and mass spot check on the basis of the technology sector, initiative to accept supervision engineers, tianjing quality supervision and quality supervision station of Beijing railway administration supervision and inspection, with the supervising engineer for good construction quality inspection and supervision engineer's request for rectification, and ensure the timely completion of construction quality. 4, with thecoordination of railway-related units to give full play of my units in railway construction experience, familiar with the advantages ofexisting procedures relating to the construction, active railway-related functions, contact the facilities management unit, comply with the relevant provisions of existing line construction, signed before construction to maintain existing equipment security operations and ensure the safety of construction match the custody agreement, and implementation in the construction process. 5, coordination with local governments, transportation agencies actively contact with local governments, transportation, environmental protection and other sectors, actively seeking the cooperation and support of the local government sector, with local governments and make the construction of law and order in the region, environmental protection, ensure成功~2.匿名用户访问:成功~3. 关闭所有写权限,不允许匿名用户上传如上所述,匿名用户无法写入。