0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AlmaLinux8でvsftpd

Posted at

vsftpdの設定

confファイルのバックアップを取る

# cd /etc/vsftpd
# cp -ip vsftpd.conf vsftpd.conf_org

vsftpd.confの設定

vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/xferlog
log_ftp_protocol=YES
dual_log_enable=YES
xferlog_std_format=NO
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd/banned_emails
local_root=/mnt/ftp
chroot_local_user=YES
chroot_list_enable=YES
allow_writeable_chroot=YES
chroot_list_file=/etc/vsftpd/chroot_list
user_config_dir=/etc/vsftpd/users
listen=YES
#listen_ipv6=NO
pam_service_name=vsftpd
userlist_enable=YES
userlist_file=/etc/vsftpd/user_list
use_localtime=YES

ログは/var/log/vsftpd.logに出力される。

ユーザ: hoge の場合

chroot_listを作成してhogeを記載。

# touch chroot_list
# vi chroot_list
chroot_list
hoge

usersディレクトリを作成してhogeファイルを置く。

# mkdir users
# cd users
# touch hoge

hogeファイルにユーザ個別のルートディレクトリを下記のように記述。(ルートディレクトリを/home/hoge/ftp_rootにする場合)

hoge
local_root=/home/hoge/ftp_root

vsftpdの開始

# systemctl start vsftpd

自動起動設定

# systemctl enable vsftpd
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?