《初入linux》--第十七部分-FTP远程管理和LDAP

一.FTP服务端

1.安装FTP

yum install vsftpd


2.启动

1)查询火墙允许的服务:

firewall-cmd --list-all


2)ftp添加火墙允许:

firewall-cmd --permanent --add-service=ftp

systemctl start vsftpd

systemctl enable vsftpd

setenforce 0    selinux强制降低安全级别,这是必须的


3.vsftpd文件信息

/var/ftp/pub        默认文件发布目录

/etc/vsftpd/        配置文件目录


4.vsftpd配置参数

vim /etc/vsftpd/vsftpd.conf

################# vsftpd.conf 文件内容样例#################
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
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


1)匿名用户开启:

anonymous_enable=YES

反之则为no

 

2)匿名用户上传

匿名用户上传时会使用ftp用户,所以:

write_enable=YES

anon_upload_enable=YES

chgrp ftp /var/ftp/pub  //组设置为ftp组

chmod 775 /var/ftp/pub

 

3)匿名用户创建目录:

anon_mkdir_write_enable = YES


4)匿名用户删除文件:

anon_other_write_enable = YES


5)匿名用户下载文件时,幅图片服务器不能读的文件默认不可下载,此时修改:

anon_world_readable_only = NO


6)匿名用户上传限速

anon_max_rate=102400


7)最大在线客户端数

max_clients=1


二.FTP客户端:

1.客户端安装:

yum    install    lftp

 

2.远程登陆

lftp xxx.xxx.xxx.xxx

[root@mazha1 pub1]# lftp 192.168.40.20
lftp 192.168.40.20:~> ls                
drwxr-xr-x    2 0        0              66 Mar 31  2016 pub

3.get下载

lftp 192.168.40.20:/pub> ls
-rwxrwxr-x    1 0        50              0 Nov 16 14:04 file1
-rwxrwxr-x    1 0        50              0 Nov 16 14:04 file2
-rwxrwxr-x    1 0        50              0 Nov 16 14:04 file3
-rwxrwxr-x    1 0        50              0 Nov 16 14:04 file4
-rwxrwxr-x    1 0        50              0 Nov 16 14:04 file5
lftp 192.168.40.20:/pub> get file1
lftp 192.168.40.20:/pub> exit
[root@mazha1 /]# ls
bin   dev  file1  lib    media  mnt  opt   root  sbin  sys  usr
boot  etc  home   lib64  misc   net  proc  run   srv   tmp  var


三.LDAP 轻量目录访问协议

authconfig --help | less 查询ldap客户端手册




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值