




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
/alan00000/article/details/7194702 1 、下载Ubuntu上的ftp客户端软件filezilla安装: sudoapt-get installfilezilla安装完成后,在应用程序-互联网会看到采用ftp客户端filezilla下载:/users/cevans/untar/ 下载vsftpd-2.3.42 、修改Makefile文件CC=arm-linux-gcc3 、执行make若出现错误-/bin/sh:./vsf_findlibs.sh: Permission deniedsysdeputil.o: In functionvsf_sysdep_check_auth:sysdeputil.c:(.text+0xdcc): undefinedreference to cryptsysdeputil.c:(.text+0xdf0): undefinedreference to cryptcollect2: ld returned 1 exit statusmake:* vsftpd 错误1修改./vsf_findlibs.sh属性为可读写与执行-/lib/libcap.so.2:could not read symbols: File in wrong formatcollect2: ld returned1 exit statusmake: * vsftpd 错误1修改vsffindlibs.sh:屏蔽掉49-57行;-如果之后再出现sysdeputil.o:In function vsf_sysdep_check_auth:sysdeputil.c:(.text+0xdcc):undefined reference to cryptsysdeputil.c:(.text+0xdf0):undefined reference to cryptcollect2: ld returned 1 exitstatusmake: * vsftpd 错误 1那么就把/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/lib/下的libcrypt.so.1复制到开发板根文件系统/lib目录下至于为什么这么处理我也想不明白。4 、执行arm-linux-readelf-d vsftpd显示需要哪些库,如下:Dynamicsection at offset 0x170fc contains 29 entries: Tag Type Name/Value0x00000001 (NEEDED) Shared library: libcrypt.so.1 0x00000001(NEEDED) Shared library: libc.so.60x0000000c(INIT) 0x96800x0000000d(FINI) 0x1b3f40x00000019(INIT_ARRAY) 0x26a580x0000001b(INIT_ARRAYSZ) 4 (bytes)0x0000001a(FINI_ARRAY) 0x26a5c0x0000001c(FINI_ARRAYSZ) 4 (bytes)0x00000004(HASH) 0x81680x00000005(STRTAB) 0x8d080x00000006(SYMTAB) 0x84f80x0000000a(STRSZ) 1100 (bytes)0x0000000b(SYMENT) 16 (bytes)0x00000015(DEBUG) 0x00x00000003(PLTGOT) 0x26b540x00000002(PLTRELSZ) 984 (bytes)0x00000014(PLTREL) REL0x00000017(JMPREL) 0x92a80x00000011(REL) 0x92980x00000012(RELSZ) 16 (bytes)0x00000013(RELENT) 8 (bytes)0x6ffffffe(VERNEED) 0x92580x6fffffff(VERNEEDNUM) 20x6ffffff0(VERSYM) 0x91540x00000000(NULL) 0x0把libcrypt.so.1l libc.so.6 及这两个连接所指向的源文件用cp-a 复制到根文件系统的/lib另外还有libnss_files.so.2及该连接所指向的源文件, 否则运行时会出现:500OOPS: vsftpd: cannot locate user specified inftp_username:ftp错误;(这点错误弄了一晚上好几个小时)ps:好帅老师辛苦了5 、把生成的vsftpd拷贝到根文件系统的sbin目录,vsftpd.conf文件拷贝到根文件系统的etc目录下6 、配置vsftpd.conf对配置文件进行了修改,我的: #Example config file /etc/vsftpd.conf# The default compiledin settings are fairly paranoid. This sample file# loosens thingsup a bit, to make the ftp daemon more usable.# Please seevsftpd.conf.5 for all compiled in defaults.# READ THIS: Thisexample file is NOT an exhaustive list of vsftpd options.# Pleaseread the vsftpd.conf.5 manual page to get a full idea of vsftpds#capabilities.# Allow anonymous FTP? (Beware - allowed bydefault if you comment this out).anonymous_enable=YES#Uncomment this to allow local users to log in.local_enable=YES#Uncomment this to enable any form of FTP writecommand.write_enable=YES# Default umask for local usersis 077. You may wish to change this to 022,# if your users expectthat (022 is used by most other ftpds)#local_umask=022#Uncomment this to allow the anonymous FTP user to upload files. Thisonly# has an effect if the above global write enable isactivated. Also, you will# obviously need to create a directorywritable by the FTP user.anon_upload_enable=YES#Uncomment this if you want the anonymous FTP user to be able tocreate# new directories.anon_mkdir_write_enable=YES#Activate directory messages - messages given to remote users whenthey# go into a certain directory.dirmessage_enable=YES#Activate logging of uploads/downloads.#xferlog_enable=YES#Make sure PORT transfer connections originate from port 20(ftp-data).connect_from_port_20=YES# If you want, youcan arrange for uploaded anonymous files to be owned by# adifferent user. Note! Using root for uploaded files isnot# recommended!#chown_uploads用户指定anonymous帐号上传的文件是否要改变其所有者,默认为NO,chown_username用来指定新的所有者#在FTP服务器中,匿名用户的用户名和密码都是ftpchown_uploads=YESchown_username=ftp#You may override where the log file goes if you like. The default isshown# below.#xferlog_file=/var/log/vsftpd.log# Ifyou want, you can have your log file in standard ftpd xferlogformatxferlog_std_format=YES# You may change the defaultvalue for timing out an idle session.#idle_session_timeout=600#You may change the default value for timing out a dataconnection.#data_connection_timeout=120# It isrecommended that you define on your system a unique user which the#ftp server can use as a totally isolated and unprivilegeduser.nopriv_user=ftp# Enable this and the server willrecognise asynchronous ABOR requests. Not# recommended forsecurity (the code is non-trivial). Not enabling it,# however,may confuse older FTP clients.async_abor_enable=YES# Bydefault the server will pretend to allow ASCII mode but in factignore# the request. Turn on the below options to have the serveractually do ASCII# mangling on files when in ASCII mode.#Beware that on some FTP servers, ASCII support allows a denial ofservice# attack (DoS) via the command SIZE /big/filein ASCII mode. vsftpd# predicted this attack and has always beensafe, reporting the size of the# raw file.# ASCII mangling isa horrible feature of theprotocol.ascii_upload_enable=YESascii_download_enable=YES#You may fully customise the login banner string:ftpd_banner=Welcometo blah FTP service.# You may specify a file of disallowedanonymous e-mail addresses. Apparently# useful for combattingcertain DoS attacks.#deny_email_enable=YES# (defaultfollows)#banned_email_file=/etc/vsftpd.banned_emails#You may specify an explicit list of local users to chroot() to theirhome# directory. If chroot_local_user is YES, then this listbecomes a list of# users to NOTchroot().#chroot_list_enable=YES# (defaultfollows)#chroot_list_file=/etc/vsftpd.chroot_list# Youmay activate the -R option to the builtin ls. This isdisabled by# default to avoid remote users being able to causeexcessive I/O on large# sites. However, some broken FTP clientssuch as ncftp and mirror assume# thepresence of the -R option, so there is a strong case forenablingit.ls_recurse_enable=YES#使vsftpd处于独立启动模式listen=YESlisten_port=21anon_other_write_enable=YES7 、开发板根文件系统创建必要的目录:mkdir-p /var/ftp/pubmkdir -p /usr/share/emptychown root:root/var/ftpchmod 755 /var/ftpcd /var/ftpchmod 777 pub 说明:pub这个目录是用来供匿名用户上传文件的,上传的文件存放在此处,故其属性为777,而其他目录无此属性,不能用来作为上传目录。8 、创建用户/etc/group文件至少要有root:root:*:0:/etc/passwd文件增加ftp和nobody用户:root:0:0:root:/:/bin/shftp:14:50:FTPUser:/var/ftp:nobody:*:99:99:Nobody:/: 说明:root:*:0:root是用户组名称,*是密码字段,0是GID。root:0:0:root:/:/bin/shroot是用户名;后面冒号之间的空白是密码字段,这里是空;后面两个0分别是UID和GID;再后面分别指定了root的家目录为/和要登录的shell为/bin/bash。ftp:14:50:FTPUser:/var/ftp:ftp是用户名;冒号之间是密码字段,是隐藏的;14是用户的UID字段,可以自己来设定,不要和其它用户的UID相同,否则会造成系统安全问题;50用用户组的GID,可以自己设定,不要和其它用户组共用FTP的GID,否则会造成系统全全问题;FTPUser是用户说明字段,可以随意取名;/var/ftp是ftp用户的家目录,可以自己来定义;后面的shell字段为空,应该是不能登录shell;(如果 shell 字段设置为 /sbin/nologin 表示该用户不能登录系统,系统虚拟帐号(也被称为伪用户)一般都是这么设置。如果我们把 ftp 用户的 /sbin/nologin改为/bin/bash,这样ftp 用户通过本地或者远程工具ssh 或 telnet 以真实用户身份登录到系统。这样做对系统来说是不安全的)9. 开发板执行vsftpd/etc/
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 免疫细胞技术临床应用规范
- 腹膜透析的护理
- 田园四季歌课件
- 新解读《GB-T 36778 - 2018燕麦花叶病毒检疫鉴定方法》
- 用表格表示变量关系课件
- 升国旗作文教学课件
- 新解读《GB-T 22048-2022玩具及儿童用品中特定邻苯二甲酸酯增塑剂的测定》
- 2025年建筑工程管理与实务一级建造师考试冲刺押题卷
- 生活安全知识培训方案课件
- 镭雕工程师考试题及答案
- (完整版)人教版八年级下册《道德与法治》期末测试卷及答案【新版】
- 并购贷款业务培训
- 北京大学人民医院-医疗知情同意书汇编
- 档案管理员述职报告9篇
- 舞台灯光基础知识教学课件
- 建设集团有限公司安全生产管理制度汇编
- 牙体牙髓病最全课件
- 交通信号控制系统检验批质量验收记录表
- 疫苗运输温度记录表
- 各国钢材-合金牌号对照表
- 医院定岗定编要点
评论
0/150
提交评论