Compression, uncompression, and tar archival are implicit operations that you can use with the get command in ftp(1tcp). When you request a file from an FTP server using get, ftpd attempts to supply a file with the specified name from the current directory. If the server cannot find the file, it will then attempt to generate the requested filename from those listed in the current directory using the conversion rules in /etc/ftpconversions. If ftpd finds an output filename that matches the one specified, it performs the conversion and sends the result to you.
For example, you would enter the ftp command get foo to have the remote FTP server uncompress the file named foo.Z before sending it to you. (If a file named foo also exists in the same directory as foo.Z, the server will send you this instead.) Similarly, the command get bar.Z would cause the server to compress the file named bar before transmitting it. To archive and compress the hierarchy below a directory named src so that it can be sent as one file, you would enter get src.tar.Z.
To control who is allowed to use the compression and archival commands on an FTP server, edit the arguments to the compress and tar keyword lines in /etc/ftpaccess. By default, the following lines in this file allow the class all (consisting of anonymous, guest, and real users) to use the commands:
compress yes all tar yes allIf you want to prevent anonymous FTP users from using these commands, create a class anonclass containing anonymous and amend the lines to read:
compress no anonclass compress yes all tar no anonclass tar yes all
By default, the FTP Server Manager configures the compress and tar binaries for use on an FTP server. To make additional compression and archival programs available for use:
Rules are also listed in the ftpconversions file for archival and compression programs such as gzip, zip, and unzip. These programs are not provided with UnixWare but you can obtain them from the Internet if required.
Copy the binary for each program to the appropriate directory
(usually ~ftp/bin) in the FTP home area.
Change the mode of each copied binary
to 111, and change its owner and group to root and sys:
chmod 111 filename
chown root:sys filename
See also: