首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >每个用户的FTP服务器"write_enable=YES“配置

问每个用户的FTP服务器"write_enable=YES“配置
EN

Unix & Linux用户
提问于 2016-11-17 06:12:26
回答 1查看 6.6K关注 0票数 1

我正在嵌入式Linux系统上配置FTP服务器。在我的/etc/passwd中设置了一些本地用户,例如:

代码语言:javascript
复制
UserA:14:50:FTP User A:/somepath:/bin/sh
UserB:1000:0:FTP User B:/somepath:/bin/sh

问题是,我现在不知道如何为每个用户设置write_enable (是否允许任何改变文件系统的命令)。我希望UserA能够写作,而UserB则不会。示例local.vsftpd.conf:

代码语言:javascript
复制
anonymous_enable=NO
local_enable=YES
userlist_deny=YES
userlist_enable=YES
userlist_file=/UNI/System/Config/deny_vsftpd_user_list.conf
listen=YES
chroot_local_user=YES
xferlog_std_format=NO
xferlog_enable=YES
vsftpd_log_file=/tmp/vsftpd.log
allow_writeable_chroot=YES
write_enable=YES
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2016-11-20 04:49:48

在这个链接中找到了答案。这里是我的‘/etc/vsftpd.conf’的摘录:

代码语言:javascript
复制
# This powerful option allows the override of any config option specified
# in the manual page, on a per-user basis. Usage is simple, and is best
# illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf
# and then log on as the user "chris", then vsftpd will apply the settings
# in the file /etc/vsftpd_user_conf/chris for the duration of the session.
# Default: (none)
user_config_dir=/etc/vsftpd/vsftpd-user-conf

每当一个新的ftp虚拟用户需要一个个人ftp目录时,在dir '/etc/vsftpd/vsftpd- user -conf‘下,我创建一个名为username的文件,在其中定义个人ftp目录及其上的auth (RO或RW)。例如,用户'test‘(file '/etc/vsftpd/vsftpd- user -conf/test'):

代码语言:javascript
复制
# vsftpd per-user basis config file (override of any config option specified
# in the vsftpd server config file)
#
# TEMPLATE
#
# User test - Description for user test
#

# Set local root
local_root=/srv/vsftpd/test

# Disable any form of FTP write command.
# Allowed values: YES/NO
write_enable=YES
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/323910

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档