Operating System - HP-UX
1758021 Members
2051 Online
108866 Solutions
New Discussion

Re: Defining FTP starting dir

 
SOLVED
Go to solution
news groups
Occasional Advisor

Defining FTP starting dir

Anyone know how to define the FS and the starting directory for ftp sessions?
TIA

1 REPLY 1
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Defining FTP starting dir

Hi,

The starting directory depends on the userid you login via FTP. To change the starting directory, "vipw" the /etc/passwd file to modify the home/starting directory.

Man-page extract:
==
An system administrator can permit public access or ``anonymous FTP.'' If this has been set up, users can access the anonymous FTP account with the user name anonymous or ftp and any non-null password (by convention, the client host's name). ftpd does a chroot() to the home directory of user ftp, thus limiting anonymous FTP users' access to the system. If the user name is anonymous or ftp, an anonymous FTP account must be present in the password file (user ftp). In this case the user is allowed to log in by specifying any password (by convention this is given as the user's e-mail address).

In order to permit anonymous FTP, there must be an entry in the passwd(4) database for an account named ftp. The password field should be *, the group membership should be guest, and the login shell should be /usr/bin/false. For example (assuming the guest group ID is 10):

ftp:*:500:10:anonymous:ftp:/home/ftp:/usr/bin/false
==

Regards.

Steven Sim.