谁会用VSFTPD建立本地用户
不要叫我去网找 我只想要个成功的列子 网上的头都看大了 配置本地组访问的FTP首先创建用户组 test和FTP的主目录
groupadd test
mkdir /tmp/test
然后创建用户
useradd -G test –d /tmp/test –M usr1
注:G:用户所在的组 d:表示创建用户的自己目录的位置给予指定
M:不建立默认的自家目录,也就是说在/home下没有自己的目录
useradd –G test –d /tmp/test –M usr2
接着改变文件夹的属主和权限
chown usr1.test /tmp/test ----这表示把/tmp/test的属主定为usr1
chmod 750 /tmp/test ----7表示wrx 5表示rx 0表示什么权限都没有
这个实验的目的就是usr1有上传、删除和下载的权限
而usr2只有下载的权限没有上传和删除的权限
当然啦大家别忘了我们的主配置文件vsftpd.conf
要确定local_enable=yes、write_enable=yes、chroot_local_usr=yes这三个选项是有的哦!
配置独立FTP的服务器的非端口标准模式进行数据连接
这个非常容易:在VSFTPD。CONF中添加
Listen_port=33333
就可以了啦!
useradd -G test –d /tmp/test –M usr1
当我用上面命令的时候就会
[root@localhost ~]# useradd -G test –d /tmp/test –M usr1
usage: useradd [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
useradd -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]
这就像WINDOWS里面输入的格式错误 然后就会出一大堆提示格式。。
我理解错了没有?
还有就是这个方案可以建立本地用户吗? anonymous_enable=YES
local_enable=YES
write_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
listen=YES
listen_port=33333
chroot_local_usr=YES
ascii_upload_enable=NO
ascii_download_enable=NO 500 OOPS: unrecognised variable in config file: chroot_local_usr [root@localhost ~]# useradd jiyi
[root@localhost ~]# passwd jiyi
Changing password for user jiyi.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
页:
[1]