各ユーザーのFTPサーバー(VSFTP)「write_enable = YES」の構成

各ユーザーのFTPサーバー(VSFTP)「write_enable = YES」の構成

組み込みLinuxシステムでFTPサーバーを構成しています。私の/etc/passwdローカルユーザーには次の設定があります。

UserA:14:50:FTP User A:/somepath:/bin/sh
UserB:1000:0:FTP User B:/somepath:/bin/sh

write_enable問題は、ユーザーごとに設定する方法(ファイルシステムを変更するFTPコマンドを許可するかどうか)がわからないことです。書かなくUserAても書けたらと思いますUserB。例local.vsftpd.conf:

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

ベストアンサー1

ここで答えを見つけました協会。以下は私の「/etc/vsftpd.conf」から抜粋したものです。

# 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ディレクトリを必要とするたびに、/etc/vsftpd/vsftpd-user-confディレクトリの下にプライベートFTPディレクトリとその認証(ROまたはRW)を定義するusernameというファイルを作成します。 。ユーザー "test" の例 (ファイル "/etc/vsftpd/vsftpd-user-conf/test"):

# 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

おすすめ記事