Hi actino,
This may be useful, see below:
FTP Check sheet when setting up a FTPD site.
-
ftpconfig - set up anonymous FTP
command to use:
ftpconfig [ftpdir]
ftpconfig -d ftpdir
OPTIONS
-d Create a new or update an existing ftpdir without
creating or updating the ftp user account. Use this
option when creating guest FTP user accounts.
ftpdir
The absolute pathname of the directory under which the
anonymous FTP area is set up.
-
NAME
ftpaddhost - set up a virtual FTP host
command to use:
ftpaddhost -c | -l [-b] [-x xferlog] hostname root_dir
OPTIONS
The ftpaddhost script supports the following options:
-b Create a banner for the virtual host. This option is
useful to confirm that the virtual host is working.
-c Configure complete virtual hosting. This option allows
each virtual host to have its own version of the
ftpaccess, ftpconversions, ftpgroups, ftphosts, and
ftpusers files. The master version of each of these
configuration files is copied from the /etc/ftpd
directory and placed in the /etc/ftpd/virtual-
ftpd/hostname directory. If the /etc/ftpusers file
exists it is appended to the virtual ftpusers file. If
a virtual host lacks its own version of a configura-
tion file, the master version is used.
-l Configure limited virtual hosting. This option allows
a small number of parameters to be configured dif-
ferently for a virtual host. See the virtual keyword
on the ftpaccess\(4\) manual page.
-x xferlog
Create a logfile entry such that the transfer logs for
the virtual host are written to the specified file. An
absolute path must be specified for the xferlog file.
FILES
/etc/ftpd/virtual-ftpd/hostname
The configuration files directory for the virtual host
hostname.
-
NAME
ftpservers - FTP Server virtual hosting configuration file
DESCRIPTION
The ftpservers file is used to configure complete virtual
hosting. In contrast to limited virtual hosting, complete
virtual hosting allows separate configuration files to be
specified for each virtual host.
File options
/etc/ftpd/ftpservers
File Format
There are two fields to each entry in the ftpservers file:
address directory-containing-configuration-files
For example:
10.196.145.10 /etc/ftpd/virtual-ftpd/10.196.145.10
10.196.145.200 /etc/ftpd//virtual-ftpd/10.196.145.200
some.domain INTERNAL
Either the actual IP address or a specific hostname can be
used to specify the virtual host. It is better to specify
the actual IP of the virtual host, as it reduces the need
for a domain lookup and eliminates DNS security related nam-
ing issues, for example:
10.196.145.20 /etc/ftpd/config/faqs.org/
ftp.some.domain /etc/ftpd/config/faqs.org/
Lines that begin with a \# sign are treated as comment lines
and are ignored.
-
NAME
in.ftpd, ftpd - File Transfer Protocol Server
Command to use
in.ftpd
OPTIONS
in.ftpd supports the following options:
-4 When running in standalone mode, listen for connec-
tions on an AF_INET type socket. The default is to
listen on an AF_INET6 type socket.
-a Enables use of the ftpaccess\(4\) file.
-A Disables use of the ftpaccess\(4\) file. Use of ftpac-
cess is disabled by default.
-C Non-anonymous users need local credentials \(for exam-
ple, to authenticate to remote fileservers\). So they
should be prompted for a password unless they for-
warded credentials as part of authentication.
-d Writes debugging information to syslogd\(1M\).
-i Logs the names of all files received by the FTP Server
to xferlog\(4\). You can override the -i option through
use of the ftpaccess\(4\) file.
-I Disables the use of AUTH and ident to determine the
username on the client. See RFC 931. The FTP Server is
built not to use AUTH and ident.
-K Connections are only allowed for users who can authen-
ticate through the ftp AUTH mechanism. \(Anonymous ftp
may also be allowed if it is configured.\) ftpd will
ask the user for a password if one is required.
-l Logs each FTP session to syslogd\(1M\).
-L Logs all commands sent to in.ftpd to syslogd\(1M\). When
the -L option is used, command logging will be on by
default, once the FTP Server is invoked. Because the
OR
Anonymous FTP can be set up under Solaris by performing the following steps.
Remember, however, that Anonymous FTP opens up your system to allow anonymous
users to perform file transfers. In general, Anonymous FTP should be considered
a security concern and should be enabled only if it is absolutely necessary.
Also, to allow FTP to work properly in a chroot environment, make sure that
the file system containing the FTP home directory is not mounted as nosuid.
-
Create the FTP home directory structure:
mkdir /export/ftp/pub
mkdir /export/ftp/bin
mkdir /export/ftp/dev
mkdir /export/ftp/etc
mkdir /export/ftp/usr
mkdir /export/ftp/usr/lib
-
Add the ls command to the FTP bin directory:
cp /usr/bin/ls /export/ftp/bin
chmod 111 /export/ftp/bin/ls
-
Copy the necessary libraries into the FTP directory structure:
cp /usr/lib/ld.so* /export/ftp/usr/lib
cp /usr/lib/libc.so.1 /usr/lib/libdl.so.1 /export/ftp/usr/lib
cp /usr/lib/libintl.so.1 usr/lib/libw.so.1 /export/ftp/usr/lib
cp /etc/passwd /etc/group /etc/netconfig /export/ftp/etc
-
Copy the necessary files into the FTP directory structure to resolve NIS names:
cp /usr/lib/nss*.so.1 /export/ftp/usr/lib
cp /usr/lib/libnsl.so.1 /export/ftp/usr/lib
cp /usr/lib/straddr.so /export/ftp/usr/lib
cp /etc/nsswitch.conf /export/ftp/etc
-
Set the permissions for the /export/ftp/usr/lib and /export/ftp/etc directories:
chmod 555 /export/ftp/usr/lib/*
chmod 444 /export/ftp/etc/*
-
Set the permissions of all the created directories:
chmod 555 /export/ftp/usr/lib
chmod 555 /export/ftp/usr
chmod 555 /export/ftp/bin
chmod 555 /export/ftp/dev
chmod 555 /export/ftp/etc
chmod 755 /export/ftp/pub
chmod 555 /export/ftp
-
Add the following line to the /etc/passwd file:
ftp:x:30000:30000:Anonymous FTP:/export/ftp:/bin/false
-
Add the following line to the /etc/shadow file:
ftp:NP:6445::::
-
Make sure that everything is owned by root and not by FTP:
chown -R root /export/ftp
I hope this is of help.
Jnike