[root@w tmp]# cat /etc/*release
CentOS Linux release 7.8.2003 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.8.2003 (Core)
CentOS Linux release 7.8.2003 (Core)
Устанавливаем:
yum install tftp-server xinetd
Настройки:
[root@w tmp]# cat /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -p -u tftpd -U 111 -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
Добавляем пользователя:
useradd -d /var/lib/tftpboot -s /sbin/nologin tftpd
chown tftpd:tftpd /var/lib/tftpboot
chmod 0777 /var/lib/tftpboot
Запускаем и добавляем в загрузку:
firewall-cmd --zone=public --add-service=tftp --permanent
firewall-cmd --zone=public --add-service=tftp
systemctl enable xinetd
systemctl restart xinetd
Проверяем скачивание:
[user@host ~]$ tftp -4 192.168.7.3 -c get somefile.txt
И загрузку:
[user@host ~]$ tftp -4 192.168.7.3 -c put somefile.txt
Загрузился с такими правами:
-rw-rw-rw- 1 tftpd tftpd 223 Apr 15 09:10 somefile.txt
Ви маєте увійти під своїм обліковим записом