Network Application: configuration of File Uploading by anonymous users on the FTP server

Source: Internet
Author: User
Tags ftp file
Article Title: Network Application: configuration of File Uploading by anonymous users on the FTP server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Environment:
  
RedHat 7.3 wu-ftp-2.6.2 proftpd-1.2.4
  
Steps:
  
1. wu-ftp
  
A. Install the wu-ftpd-2.6.2-5.i386.rpm and anonftp-4.0-9.i386.rpm packages from the RedHat Disc
  
# Rpm-ivh anonftp-4.0-9.i386.rpm wu-ftpd-2.6.2-5.i386.rpm
  
B. Create the directory incoming as the upload directory
  
# Mkdir/var/ftp/incoming
  
C. Create an ftp file administrator. This user has the permission to manage all uploaded files. This user should not be the root or anonymous ftp user account. Here I use ftpadmin:
  
# Groupadd-g 96 ftpadmin
  
# Useradd-g 96-u 96-s/sbin/nologin-d/var/ftp/ftpadmin
  
D. Modify the owner and permissions of the incoming directory:
  
# Chown ftpadmin/var/ftp/incoming
  
# Chgrp ftpadmin/var/ftp/incoming
  
# Chmod 3773/var/ftp/incoming (anonymous users cannot download files from the incoming directory, so the attribute of this directory is 3 Write and execute)
  
E. Modify the/etc/ftpaccess file to allow the file to be uploaded. Add the following lines to the file:
  
Upload/var/ftp/incoming yes ftpadmin 0440 nodirs
  
The meaning of this sentence is that the incoming directory under the/var/ftp directory allows file upload. The file owner is ftpadmin, the group owner is ftpadmin, and the attribute after file upload is 0440, directory creation is not allowed. If you are allowed to create a directory, change nodirs to dirs. For more instructions, use man ftpaccess.
  
F. Modify/etc/xinetd. d/wu-ftp, change disable = yes to disable = no, and restart the xinetd process.
  
#/Etc/initd./xinetd restart
  
G. Test it by yourself:
  
# Ftp 127.0.0.1
Connected to 127.0.0.1.
220 ns2.catv.net FTP server (Version wu-2.6.2-5) ready.
504 auth gssapi not supported.
504 auth login OS _v4 not supported.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1: root): ftp
331 Guest login OK, send your complete e-mail address as password.
Password:
230-The response ''is not valid
230-Next time please use your e-mail address as your password
230-for example: joe@localhost.localdomain
230 Guest login OK, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp> cd incoming
Ftp> put vpopmai.tar.gz
Local: vpopmai.tar.gz remote: vpopmai.tar.gz
227 Entering Passive Mode)
150 Opening BINARY mode data connection for vpopmai.tar.gz.
226 Transfer complete.
273353 bytes sent in 0.032 seconds (8.3e + 03 Kbytes/s)
Ftp> bye
  
I wanted to write the proftpd configuration. Let's take a look at it.
  
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.