LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1181|回复: 8

如何建proftp用户?弄了三天都没有成功

[复制链接]
发表于 2005-12-23 09:07:22 | 显示全部楼层 |阅读模式
DEBIAN下源码安装proftp

装好后没有作任何配置,普通用户可以登陆到自己的HOME目录下

我的网页放置在/myfile/sites下面
我现在需要建一个这样的用户,能够登陆到/myfile/sites下,并有上传、下载、删除等权限来维护网站

我用如下命令:
groupadd ftpgroup #建个组
useradd -d /myfile/sites -s /bin/fales -g ftpgroup ftpuser  #建个用户,仿照网上的教程做的, 我想条命令是建一个名为ftpuser的用户,并指定家目录为/myfile/sites,可是为什么它不能FTP登陆到家目录呢?
passwd ftpuser #加个密码
chown ftpuser:ftpgroup /myfile/sites #把/myfile/sites的属主改为ftpuser

------------
可是这样做ftpuser不能登陆,530错误
弄了两天了,救命啊

[ 本帖最后由 YourEyes 于 2005-12-21 20:58 编辑 ]
 楼主| 发表于 2005-12-23 09:08:29 | 显示全部楼层
默认配置,没有改任何地方
debian3.1
# 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                           nogroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite          on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
  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
  <Limit WRITE>
    DenyAll
  </Limit>
</Anonymous>
                                                                                 
回复 支持 反对

使用道具 举报

发表于 2005-12-23 11:18:34 | 显示全部楼层
你建了一个用户 ftpuser:ftpgroup

需要在/etc/proftpd.conf里面加入

<Anonymous /myfile/sites>
user                          ftpuser
group                         ftpgroup
... ...

</Anonymous>
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-23 23:41:11 | 显示全部楼层
Post by rotation
你建了一个用户 ftpuser:ftpgroup

需要在/etc/proftpd.conf里面加入

<Anonymous /myfile/sites>
user                          ftpuser
group                         ftpgroup
... ...

</Anonymous>

没有用
我不是想建匿名用户
是一个有密码的,只有访问/myfile/sites的用户
回复 支持 反对

使用道具 举报

发表于 2005-12-24 08:48:09 | 显示全部楼层
老问题了,应该是shell问题。两种方法解决,任选其一:
1、将/bin/false加到有效shell列表中,也就是/etc/shell中;
2、在proftpd配置文件中加入:
RequireValidShell off
回复 支持 反对

使用道具 举报

发表于 2005-12-24 08:50:38 | 显示全部楼层
还有一种可能,就是你新建的用户对指定目录没有访问权限,proftpd也不允许用户登陆。
回复 支持 反对

使用道具 举报

发表于 2005-12-24 14:31:04 | 显示全部楼层
这有一个帖,感觉不错,希望对你有用.
http://www.linuxbyte.net/bbs/index.php?showtopic=1060
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-27 12:51:55 | 显示全部楼层
Post by memory
老问题了,应该是shell问题。两种方法解决,任选其一:
1、将/bin/false加到有效shell列表中,也就是/etc/shell中;
2、在proftpd配置文件中加入:
RequireValidShell off

我做了2,为何不起作用?
回复 支持 反对

使用道具 举报

发表于 2005-12-27 22:09:24 | 显示全部楼层
使用RequireValidShell指令肯定没有问题,我一直是这么用的。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表