Proftpd 大虾的学习笔记(1)(2)
四、现在正式来配置proftpd.conf里的权限设置,
vi /etc/proftpd/etc/proftpd.conf这是我的配置文件:
- # This is a basic ProFTPD configuration file (rename it to
- # 'proftpd.conf' for actual use. It establishes a single server
- # and a single anonymous login. It assumes that you have a user/group
- # "nobody" and "ftp" for normal operation and anon.
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
- # Umask 022 is a good standard umask to prevent new dirs and files
- # from being group and world writable.
Umask 022
- # To prevent DoS attacks, set the maximum number of child processes
- # to 30. If you need to allow more than 30 concurrent connections
- # at once, simply increase this value. Note that this ONLY works
- # in standalone mode, in inetd mode you should use an inetd server
- # that allows you to limit maximum number of processes per service
- # (such as xinetd).
MaxInstances 30
# Set the user and group under which the server will run.
User nobody
Group nobody (这边就是我在上一步所讲的设置成nobody)
- # To cause every FTP user to be "jailed" (chrooted) into their home
- # directory, uncomment this line.
DefaultRoot ~ skate,skate(阻止skate组的用户到其他目录,它们只能呆在自家目录)
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
DenyAll
- # A basic anonymous configuration, no upload directories. If you do not
- # want anonymous users, simply delete this entire ; section.
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
- # We want 'welcome.msg' displayed at login, and '.message' displayed
- # in each newly chdired directory.
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的知识献给你们,快跟朋友分享吧!
评论暂时关闭