四、现在正式来配置proftpd.conf里的权限设置,

vi /etc/proftpd/etc/proftpd.conf这是我的配置文件:

  1. # This is a basic ProFTPD configuration file (rename it to  
  2.  
  3. 'proftpd.conf' for actual use. It establishes a single server  
  4.  
  5. # and a single anonymous login. It assumes that you have a user/group  
  6.  
  7. "nobody" and "ftp" for normal operation and anon.  
  8.  

ServerName "ProFTPD Default Installation"

ServerType standalone

DefaultServer on

# Port 21 is the standard FTP port.

Port 21

  1. # Umask 022 is a good standard umask to prevent new dirs and files  
  2.  
  3. # from being group and world writable.  
  4.  

Umask 022

  1. # To prevent DoS attacks, set the maximum number of child processes  
  2.  
  3. # to 30. If you need to allow more than 30 concurrent connections  
  4.  
  5. # at once, simply increase this value. Note that this ONLY works  
  6.  
  7. in standalone mode, in inetd mode you should use an inetd server  
  8.  
  9. # that allows you to limit maximum number of processes per service  
  10.  
  11. # (such as xinetd).  
  12.  

MaxInstances 30

# Set the user and group under which the server will run.

User nobody

Group nobody (这边就是我在上一步所讲的设置成nobody)

  1. # To cause every FTP user to be "jailed" (chrooted) into their home  
  2.  
  3. # directory, uncomment this line.  
  4.  

DefaultRoot ~ skate,skate(阻止skate组的用户到其他目录,它们只能呆在自家目录)

# Normally, we want files to be overwriteable.

AllowOverwrite on

# Bar use of SITE CHMOD by default

DenyAll

  1. # A basic anonymous configuration, no upload directories. If you do not  
  2.  
  3. # want anonymous users, simply delete this entire ; section.  
  4.  

User ftp

Group ftp

# We want clients to be able to login with "anonymous" as well as "ftp"

UserAlias anonymous ftp

# Limit the maximum number of anonymous logins

MaxClients 10

  1. # We want 'welcome.msg' displayed at login, and '.message' displayed  
  2.  
  3. in each newly chdired directory.  
  4.  

DisplayLogin welcome.msg

DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot

DenyAll

AllowOverwrite on

AllowStoreRestart on

#AllowForeignAddress on

AllowAll

DenyUser skate

; (这几句是对skate用户的权限限制,只允许它对/var/ftp/skate有写的权限,不允许它有DELE RNFR RNTO RMD XRMD的权限)

AllowUser tc

;(这几句是对tc的权限设置,给它对/var/ftp目录拥有所有的权限,这个用户也算是FTP的管理员帐户吧。)

存盘退出

service proftpd restart

五、修改一下/var/ftp目录的权限

chmod –R 775 /var/ftp

这样tc对/var/ftp/skate的文件具有写,删,改,执行的所有权限。

六、试验一下吧,嘻

后续:

这个我第一次在网上发表笔记,平时都是记在本子里,毕竟是要传上去的,难免有点怕被扔香蕉皮,心里怪紧张的,嘻!我在配置之前我也是在网上看了好几篇的配置笔记,上面都比我这要好多了,嘻,不是谦虚的哦!看完了是不是觉得挺少东西的,是啊,比如那些用户限速之类的都没提,还有一些语句的解释,因为一开始主要是想设置一下权限,只是权限弄好了,一切都好办,你说对吧,嘻,不过还有一个原因是因为我语言表达能力不是很好,只能这样将就了,嘻!!!

http://www.5ilinux.com/blog/archives/000082.html 这个网址比较好,里面每个细节都讲得很清楚!!!!!大家一起努力吧,嘻!!!

通过文章的详细介绍,是不是那些菜鸟都变成大虾了么?Proftpd的知识献给你们,快跟朋友分享吧!


相关内容