Exports command
Common options
-A all mount or uninstall all
-R Re-mount
-U Uninstalls a directory
-V Show shared directory
The following operations are on the service side
Vim/etc/exports//Increase
/tmp/192.168.91.129 (Rw,sync,no_root_squash)
EXPORTFS-ARV//Do not restart the NFS service, the configuration file will take effect
View on Client
Note that after using No_root_squash, the client and server file attributes are the same.
Create 1212.txt view file properties under the client/mnt directory
View file properties in the server/tmp directory
NFS Client Issues
This issue occurs with NFS version 4
When a client mounts a shared directory, whether it is a root user or a normal user, a new file is created with the owner and group nobody
Add-o nfsvers=3 when client mounts
[Email protected] ~]# mount-t nfs-oremount,nfsvers=3 192.168.91.128:/tmp/mnt/
Both the client and the server need
vim/etc/idmapd.conf//
Change "#Domain = local.domain.edu" to "Domain = xxx.com" (xxx.com here, define it arbitrarily), and then restart the RPCIDMAPD service
Introduction to FTP
FTP is the abbreviation for the file Transfer Protocol (document Transfer Protocol), which is used to control the two-way transmission of files over the Internet.
The primary role of FTP is to have the user connect to a remote computer (which runs an FTP server program), view the files on the remote computer, and then copy the files from the remote computer to the local computer, or transfer the files from the local computer to the remote computer.
Small companies with many, large enterprises without FTP, because unsafe
FTP Server Configuration
Yum CentOS comes with vsftpd
Install-y vsftpd
Useradd-s/sbin/nologin virftp
Vim/etc/vsftpd/vsftpd_login//content as follows, odd behavior username, even behavior password, multiple users write multiple lines
TestUser1
Aminglinux
chmod 600/etc/vsftpd/vsftpd_login
Db_load-t-T Hash-f/etc/vsftpd/vsftpd_login/etc/vsftpd/vsftpd_login.db
Mkdir/etc/vsftpd/vsftpd_user_conf
Cd/etc/vsftpd/vsftpd_user_conf
Vim TestUser1//Add the following:
Local_root=/home/virftp/testuser1
Anonymous_enable=no Anonymous users are not allowed to log on
Write_enable=yes
local_umask=022
Anon_upload_enable=no anonymous users cannot upload files
Anon_mkdir_write_enable=no Write permission to create a directory
idle_session_timeout=600 Session Connection Timeout
data_connection_timeout=120
max_clients=10 Maximum number of connections
Mkdir/home/virftp/testuser1
Touch/home/virftp/testuser1/aming.txt
Chown-r virftp:virftp/home/virftp
VIM/ETC/PAM.D/VSFTPD//At the front Plus
Auth sufficient/lib64/security/pam_userdb.so Db=/etc/vsftpd/vsftpd_login
Account Sufficient/lib64/security/pam_userdb.so Db=/etc/vsftpd/vsftpd_login
Vim/etc/vsftpd/vsftpd.conf
Change Anonymous_enable=yes to Anonymous_enable=no
Change #anon_upload_enable=yes to Anon_upload_enable=no
Change #anon_mkdir_write_enable=yes to Anon_mkdir_write_enable=no
Add the following:
Chroot_local_user=yes
Guest_enable=yes
Guest_username=virftp
Virtual_use_local_privs=yes
User_config_dir=/etc/vsftpd/vsftpd_user_conf
Allow_writeable_chroot=yes
Systemctl start vsftpd//Start VSFTPD Service
VSFTPD Test
Yum Install-y lftp
lftp [email protected]
Execute command LS to see if normal output
viewing logs/var/log/messages and/var/log/secure if not normal
Install FileZilla client software under Windows and test
Use Xshell to access the server via SFTP, provided the server has SFTP, file permissions
EXPORTFS Command, FTP setup