当前位置:网站首页>[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
边栏推荐
- Communication layer of csframework
- 对于程序员来说,伤害力度最大的话。。。
- Jianzhi offer 04 (implemented in C language)
- Si vous ne connaissez pas ces quatre modes de mise en cache, vous osez dire que vous connaissez la mise en cache?
- Sword finger offer 05 (implemented in C language)
- Seven examples to understand the storage rules of shaped data on each bit
- Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment
- Vs201 solution to failure to open source file HPP (or link library file)
- 用数据告诉你高考最难的省份是哪里!
- Realsense d435 d435i d415 depth camera obtains RGB map, left and right infrared camera map, depth map and IMU data under ROS
猜你喜欢
Rhsca day 11 operation
Four characteristics and isolation levels of database transactions
Dichotomy search (C language)
Introduction to tree and binary tree
Occasional pit compiled by idea
From programmers to large-scale distributed architects, where are you (I)
Servlet基本原理与常见API方法的应用
OSPF comprehensive experiment
Collection of practical string functions
Today's sleep quality record 78 points
随机推荐
[untitled]
Error C4996 ‘WSAAsyncSelect‘: Use WSAEventSelect() instead or define _ WINSOCK_ DEPRECATED_ NO_ WARN
uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
Container cloud notes
Linked list operation can never change without its roots
Work order management system OTRs
system design
Latex insert picture, insert formula
Const's constant member function after the function; Form, characteristics and use of inline function
uniapp---初步使用websocket(长链接实现)
How to use diff and patch to update the source code
[Galaxy Kirin V10] [server] NUMA Technology
Dynamic memory management
MongoDB数据日期显示相差8小时 原因和解决方案
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
[Galaxy Kirin V10] [server] soft RAID configuration
六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
Rhcsa learning practice
leetcode842. Split the array into Fibonacci sequences
Basic principle of servlet and application of common API methods