首页 运维 正文
Ubuntu下安装ProFTPD小结

 2022-10-23    425  

  Ubuntu下安装ProFTPD小结:在Ubuntu Linux上安装了ProFTPD,总结了一下自己的安装过程。

  1. 配置运行ProFTPD的方法

Ubuntu下安装ProFTPD小结

  ServerTypeinetd 

  #Settheuserandgroupthattheservernormallyrunsat. 

  Usernobody 

  Groupnobody 

  如果ServerType选择了inetd,/etc/init.d/proftpd start,就会报错,因为你选择了inetd运行。

  ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.

  若要手动执行ProFTPD, 要把 ServerType 设成 standalone才行。

  2. NIS认证

  /etc/nsswitch.conf 必须有nis服务

  #Usersrequireavalidshelllistedin/etc/shellstologin. 

  #Usethisdirectivetoreleasethatconstrain. 

  #RequireValidShellsoff 

  必须把NIS Sever传过来的shell信息/usr/local/bin/bash,放在/etc/shells列表才行,否则视为invalid shell。

  另外,也可以在/etc/passwd文件中的对应shell的那个field直接进行修改为/bin/bash,则忽略远端传过来的shell信息。

  还有一个很重要的设置,

  #UncommentthisifyouareusingNISorLDAPtoretrievepasswords: 

  PersistentPasswdoff 

  PersistentPasswd 如果设置为on,就只检查/etc/passwd里面的user account,不要用uncomment,要用上述语句,切记!

  3. xinet启动ProFTPD

  #Settheuserandgroupthattheservernormallyrunsat. 

  Userroot 

  Grouproot 

  建立/etc/xinetd.d/proftpd,然后编辑如下内容。

  serviceftp 

  { 

  disable=no

  flags=REUSE

  socket_type=stream

  wait=no

  user=root

  server=/usr/sbin/proftpd 

  server_args=-c/etc/proftpd/proftpd.conf 

  log_on_success+=DURATIONUSERID 

  log_on_failure+=USERID 

  } 

  保存之后,chmod +x proftpd。

  这样Ubuntu下安装ProFTPD小结就大功告成了,大家学习得如何呢?

原文链接:https://77isp.com/post/8630.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。