ubuntu

vsftpd

최진한 2023. 5. 27. 07:07

 $ sudo apt-get install vsftpd

 

/etc/pam.d/vsftpd

session    optional     pam_keyinit.so    force revoke
auth       required     pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth       required     pam_shells.so
auth       include      password-auth
account    include      password-auth
session    required     pam_loginuid.so 
session    include      password-auth

 

sense = deny : /etc/vsftpd/user_list 파일에 있는 사용자 접근 제한

 

$ systemctl enable vsftpd

$ systemctl start vsftpd

 

$ systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-05-26 08:13:17 KST; 11h ago
  Process: 29547 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 29548 (vsftpd)
   CGroup: /system.slice/vsftpd.service
           └─29548 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

May 26 08:13:17 sh2597.cafe24.com systemd[1]: Starting Vsftpd ftp daemon...
May 26 08:13:17 sh2597.cafe24.com systemd[1]: Started Vsftpd ftp daemon.

firewall 해제

 

# firewall-cmd --permanent --add-service=ftp

# firewall-cmd --permanent --add-port=21/tcp

# firewall-cmd --reload

 

vi /etc/selinux/config

 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

~
~
~

'ubuntu' 카테고리의 다른 글

systemd  (0) 2023.06.07
Makefile  (1) 2023.06.01
kernel compile  (0) 2023.03.12
teamviewer wayland warning  (0) 2023.03.06
Access denied with code 403  (0) 2022.11.22