当前位置:网站首页>[Galaxy Kirin V10] [desktop] FTP common scene setup
[Galaxy Kirin V10] [desktop] FTP common scene setup
2022-07-04 10:35:00 【GUI Anjun @kylinos】
One 、ftp summary
See the server system above about ftp Introduction to
【 Galaxy Unicorn V10】【 The server 】ftp Introduction to use and common scene construction
Two 、 Common scene construction
( The following scenes are built with Galaxy kylin V10 0710 Take desktop system as an example )
1、 Anonymous open mode , Anonymous logins , Have full authority
#sudo -i // Desktop rights
# apt install vsftpd -y // install vsftpd
# cp -avx /etc/vsftpd.conf vsftpd.conf.bak // Back up the configuration file before modifying it
# vim /etc/vsftpd.conf // To configure
listen=YES
listen_ipv6=NO
anonymous_enable=YES
local_enable=YES
anon_root=/opt/ftp # Define anonymous user root directory
local_enable=YES
write_enable=YES
local_umask=022
anon_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_world_readable_only=YES
connect_from_port_20=YES
no_anon_password=YES
chroot_local_user=YES
allow_writeable_chroot=YES# mkdir -p /opt/ftp/pub // Create anonymous user root directory
# chmod 777 /srv/ftp/pub // Be careful , At this time, you cannot directly grant write permission to anon_root The root directory of the definition , If the root directory is set to 777( That is, you have write permission ), Login Report ”500 OOPS: vsftpd: refusing to run with writable root inside chroot()“ Error of , Because from vsftpd2.3.5 After the version ,vsftpd Enhanced security checks , If the user is restricted to his home directory , Then the user's home directory can no longer have write permission ! If you find that you have write permission , Will report the error . So here's another one pub Catalog , take pub Directory gives write permission , Realize anonymous user creation, file uploading and other write operations
# systemctl restart vsftpd
2、 Local user mode , You need a user name and password to log in , Deny anonymous login
# sudo -i // Desktop rights
# mkdir -p /opt/ftp/lisi/pub // Create a lisi Of ftp User root
# useradd lisi -s /sbin/nologin -d /opt/ftp/lisi // For system safety , To create ftp user lisi Set to nologin, It is not allowed to use lisi Users log in to the operating system directly , then -d Parameter is change lisi The user's home directory is specified ftp root directory
# vim /etc/pam.d/vsftpd // Need to be commented out PAM The module of vsftp Over authentication of login ( The last line ), otherwise lisi The user is nologin You will not be able to log in ftp

# passwd lisi // Set the password
# vim /etc/vsftpd.conf
listen=YES
listen_ipv6=NO
anonymous_enable=NO # Prohibit anonymous users from accessing
local_enable=YES
chroot_local_user=YES
local_root=/opt/ftp/lisi
local_enable=YES
write_enable=YES
local_umask=022
connect_from_port_20=YES
allow_writeable_chroot=YES# chmod 777 /opt/ftp/lisi/pub
# systemctl restart vsftpd
【 notes 】: If the client uses windows Of filezilla There is an error when accessing the Chinese folder , You can set the encoding format to UTF8, The operation mode is as follows :
use FileZilla Give yourself the FTP When transferring documents , Always prompt “Failed to convert command to 8 bit charset” error , This is a FileZilla Unable to correctly judge the character set encoding , The solution is as follows :
1、 open FileZilla Of “ Site manager ”-“ Character set ” page
2、 choice “ Use a custom character set ”
3、 Fill in your own code FTP The character set of the server , It is also mandatory to use UTF8 Format
边栏推荐
- 2020-03-28
- Two way process republication + routing policy
- leetcode842. Split the array into Fibonacci sequences
- Architecture introduction
- /*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
- 用数据告诉你高考最难的省份是哪里!
- Add t more space to your computer (no need to add hard disk)
- If the uniapp is less than 1000, it will be displayed according to the original number. If the number exceeds 1000, it will be converted into 10w+ 1.3k+ display
- [Galaxy Kirin V10] [desktop] printer
- Check 15 developer tools of Alibaba
猜你喜欢
If you don't know these four caching modes, dare you say you understand caching?

Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}

OSPF summary

Two way process republication + routing policy

OSPF comprehensive experiment

Summary of several job scheduling problems

Doris / Clickhouse / Hudi, a phased summary in June

Reasons and solutions for the 8-hour difference in mongodb data date display

MongoDB数据日期显示相差8小时 原因和解决方案

Rhsca day 11 operation
随机推荐
Introduction to extensible system architecture
Ruby time format conversion strftime MS matching format
[Galaxy Kirin V10] [desktop and server] FRP intranet penetration
【Day1】 deep-learning-basics
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
今日睡眠质量记录78分
From programmers to large-scale distributed architects, where are you (2)
For programmers, if it hurts the most...
C language structure to realize simple address book
Software sharing: the best PDF document conversion tool and PDF Suite Enterprise version sharing | with sharing
Es advanced series - 1 JVM memory allocation
Si vous ne connaissez pas ces quatre modes de mise en cache, vous osez dire que vous connaissez la mise en cache?
BGP ---- border gateway routing protocol ----- basic experiment
Write a program to judge whether the two arrays are equal, and then write a similar program to compare the two vectors.
RHCE - day one
Recursion and divide and conquer strategy
Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 2
The bamboo shadow sweeps the steps, the dust does not move, and the moon passes through the marsh without trace -- in-depth understanding of the pointer
Network disk installation
VLAN part of switching technology