Linux FTP server to configure FTP transfer logging
Use the following procedure to set up FTP for logging:
1.# Cp/etc/inetd.conf/etc/inetd.conf.bak
2.# vi/etc/inetd.conf
Edit the FTP line as follows, with the-l flag added at the end:
FTP stream TCP6 nowait root/usr/sbin/ftpd ftpd-l
3.# vi/etc/syslog.conf
At the end of the syslog.conf file, add the following line:
Daemon.info/tmp/ftp.log
4.# Touch/tmp/ftp.log
5.# refresh-s inetd
6.# refresh-s syslogd
Methods of restricting Linux users to their own directories in an FTP server
Step one: Create an FTP guest group, using the Groupadd command, or an FTP group that you can create with an FTP server.
#less/etc/group//See if there are any, if the FTP server installed the group exists;
Step Two: Add the FTP user to the FTP group;
The third step: Modify the/etc/ftpaccess file, add the definition of Guestgroup: guestgroup ftp;
Or use Guestuser to specify the FTP user name directly, such as:
#guestuser Ftpuser;
Step Fourth: Copy the necessary files to this user's $HOME directory, mainly with LS. General LS to Lib support, you have to recompile LS, or the Lib directory copy past, or copy the FTP server with LS, such as the/home/ftp/under the Bin,etc,lib three directory copy to the user's root directory, and modify the permissions:
Chown Username.ftp *
Note: Now Linux under the FTP without copying these files, at least Redhat6.1 is not required to copy, so you can omit the fourth step.
Using FTP to transfer files between Linux and Windows XP
I installed Linux with a virtual machine, the real system is Windows XP, under Windows XP with Serv-u software set up an FTP server, and then we can log on to the virtual machine Linux FTP server to download or upload files, The difference is only in Linux is in the command line input related FTP command to complete, should also have like FLASHFXP, cuteftp this kind of Linux special software, but I am ignorant, do not understand, also not fraught.
A brief introduction to Linux under the FTP command:
1, connect the FTP server
Format: FTP hostname or ip-address
A) Enter the machine IP or host name of the server under the Linux command line: FTP 10.60.48.195
b The server asks you the username and the password, separately enters later, will be authenticated passes. Note: Enter the password, the terminal does not display input, always a blank, so as long as you determine the correct input, press ENTER on the line.
2, download the file
The download file typically uses the Get and mget two commands, get for a single file, and mget multiple files.
a) Get
Format: Get the file name to be downloaded to save to the local file name
To get d:piclogo.jpg on the server, enter the following command
Get/pic/logo.jpg face.jpg
The file "logo.jpg" on the server is then downloaded to the local machine and renamed to "Face.jpg".
b) mget
Format: mget to download the batch file
To download all files under D:pic on the server, enter the following command
Cd/pic
Mget *.*
Note: The downloaded files are saved to the Linux host's current directory. For example, if you run the FTP command under/root/moqingwen, all the files are downloaded to the/root/moqingwen.
3, Upload files
The upload file usually uses the put and mput two commands, putting is used for a single file, Mput is multiple files.
a) put
Format: Put the local file to upload to the file on the server
To upload the local logo.jpg to the server e:pic and rename it to Face.jpg,
Put Logo.jpg/pic/face.jpg
b) mput
Format: mput The local batch file to upload
To upload all JPG files in the local current directory to the server e:pic,
Cd/rose
Mput *.jpg
Note: The upload files are from the Linux host's current directory. For example, the FTP command that runs under/root/moqingwen, only the files under/root/moqingwen are uploaded to the server.
4. Disconnect the connection
Bye: Interrupts the connection to the server.
Format: Bye
Although it is very simple, but very practical.