ubuntu vsftpd

一:vsftpd安装

sudo apt-get install vsftpd

二:源码安装

 源码包下载地址

tar -xzvf vsftpd-3.0.3.tar.gz

cd vsftpd-3.0.3

修改builddefs.h

安装依赖

sudo apt-get install openssl

sudo apt-get install libssl-dev

sudo apt-get install libssl1.1

sudo apt install libwrap0-dev

make && make install

二:vsftpd配置

man vsftpd 查看vsftpd

man vsftpd.conf 查看vsftpd.conf配置说明

匿名配置:

# Allow anonymous FTP? (Disabled by default).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
anon_root=/home/keda/ftp-root
no_anon_password=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022

 日志配置:

#记录服务器上传和下载情况的日志文件.默认值为NO
xferlog_enable=YES 
xferlog_std_format=YES 
xferlog_file=/var/log/xferlog   
dual_log_enable=YES 
vsftpd_log_file=/var/log/vsftpd.log 

三:启动服务

        systemctl stop vsftpd.service

        systemctl start vsftpd.service

        systemctl restart vsftpd.service

        systemctl statues vsftpd.service

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
安装步骤: 0、交叉编译环境配置 在/etc/profiel 和 .bashrc 文件中增加以下内容 export PTAH=$PATH://root/compile/arm-none-linux-gnueabi/bin source .bashrc 1、解压 tar -zxvf vsftpd-3.0.3.tar.gz.tar 2、修改Makefile文件 vim Makefile CC=arm-none-linux-gnueabi-gcc 3、执行make,已修复以下错误 make (1)错误提示:/bin/sh:./vsf_findlibs.sh: Permission denied 解决措施:chmod 775 ./vsf_findlibs.sh (2)错误提示:/lib/libcap.so.2:could not read symbols: File in wrong format 解决措施:修改vsffindlibs.sh,屏蔽掉50-60行 (3)错误提示:sysdeputil.c:(.text+0xdcc):undefined reference to `crypt' 解决措施:arm-none-linux-gnueabi/libc/lib/下的libcrypt.so.1复制到开发板根文件系统/lib目录下 4、拷贝文件到开发板中 make成功之后有在当前目录生成了vsftpd文件,通过以下命令查找对应的依赖性 arm-linux-readelf -d vsftpd   Tag        Type                        Name/Value 0x00000001 (NEEDED)                    Shared library: [libcrypt.so.1] 0x00000001(NEEDED)                     Shared library: [libc.so.6] 把vsftpd、libcrypt.so.1及这两个连接所指向的源文件拷贝开发板系统根目录/lib中。 把生成的vsftpd拷贝到根文件系统的sbin目录,vsftpd.conf文件拷贝到开发板系统根文件系统的etc目录下。 5、配置vsftpd.conf #使vsftpd处于独立启动模式 listen=YES listen_port=21 anon_other_write_enable=YES 6、开发板根文件系统创建必要的目录: mkdir-p /var/ftp/pub mkdir -p /usr/share/empty chown root:root/var/ftp chmod 755 /var/ftp cd /var/ftp chmod 777 pub pub这个目录是用来供匿名用户上传文件的,上传的文件存放在此处,故其属性为777,而其他目录无此属性,不能用来作为上传目录。 7、开发板执行以下命令启动 vsftpd/etc/vsftpd.conf& 8、启动ftp登录 用户名root密码空,可访问开发板任意目录; 用户名anonymous密码空,可访问/var/ftp/pub目录 用户名ftp密码空,可访问/var/ftp/pub目录

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值