In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
1. Create the user teacher and specify the home directory as / ftproot and the password set to pwd@123 (5 points)
[root@localhost] # useradd-d / ftproot teacher
[root@localhost ~] # echo pwd@123 | passwd-- stdin teacher
[root@localhost ~] # grep teacher / etc/passwd
two。 Create a logical volume / dev/ftp_vg/ftp_lv with a size of 45G using / dev/sd {bforce c ftproot d} and mount it permanently to the / volume directory. (30 points)
[root@localhost ~] # fdisk-cu / dev/sdb
[root@localhost ~] # fdisk-cu / dev/sdc
[root@localhost ~] # fdisk-cu / dev/sdd
[root@localhost ~] # pvcreate / dev/sd {bpene cpene d} 1
[root@localhost ~] # vgcreate / dev/ftp_vg / dev/sd {brecronomec d} 1
[root@localhost] # lvcreate-n / dev/ftp_vg/ftp_lv-L 45G
[root@localhost ~] # mkfs.ext4 / dev/ftp_vg/ftp_lv
[root@localhost ~] # vi / etc/fstab
:
/ dev/ftp_vg/ftp_lv / ftproot ext4 defaults 0 0
: wq
[root@localhost] # mount-a
[root@localhost ~] # mount
3. Install and configure ftp for the school according to the following requirements:
1) there are three directories under the ftp root directory:
Benet5.2 requires all students to upload assignments (upload files cannot be: * .rmvb,*.mp3,*.avi,*.exe) but cannot be downloaded, and teacher is required to authorize and download student assignments to the directory; (20 points)
Public requires sharing of learning materials, students can download can not upload, teacher can upload and download; (20 points)
The Teacher directory is accessible only to teacher and not to anyone else. (20 points)
2) access the test and verify it. (5 points)
Configuration items added by the main profile:
Anon_upload_enable=YES
Anon_mkdir_write_enable=NO
Chown_uploads=YES
Chown_username=teacher
Chroot_local_user=YES
Anon_root=/ftproot
Deny_file= {* .rmvb,*.mp3,*.avi,*.exe}
Recommended steps:
[root@localhost ~] # yum-y install vsftpd
[root@localhost ~] # vi / etc/vsftpd/vsftpd.conf
:% g / ^ # / d (delete comments)
:% g / ^ $/ d (delete blank lines)
Add the following:
Anon_upload_enable=YES
Anon_mkdir_write_enable=NO
Chown_uploads=YES
Chown_username=teacher
Chroot_local_user=YES
Anon_root=/ftproot
Deny_file= {* .rmvb,*.mp3,*.avi,*.exe}
: wq
[root@localhost ~] # chown teacher:teacher / ftproot/
[root@localhost ~] # rm-rf / ftproot/*
[root@localhost ~] # chmod 755 / ftproot/
[root@localhost ~] # / etc/init.d/vsftpd start
[root@localhost ~] # chkconfig vsftpd on
Windows accesses ftp, uses teacher users to log in and create Benet5.2, Public, Teacher directories, establishes class directories and authorizes them under Benet5.2, uploads resources to Public and Teacher directories, and closes the window.
[root@localhost ~] # chmod 700 / ftproot/Teacher/ # # Authorization
Access Test:
Anonymous access, upload jobs, download jobs, download resources in Public, visit teacher.
User teacher login
Permissions to create the teacher folder
Anonymous users do not have permission to access the teacher folder (the above command takes effect)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
NetScaler101:HTTP redirect HTTPS- method 1
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.