Operating System - HP-UX
1832535 Members
7656 Online
110043 Solutions
New Discussion

How can I implement anonymous ftp?

 
Rashid Ali
Frequent Advisor

How can I implement anonymous ftp?

Anybody can advise me on how to implement anonymous ftp ? I have tried it myself with the help of "man ftpd", but after I got the "ftp>" prompt, I can't see the contents of the current directory, even though I can transfer files if I know the file name.
2 REPLIES 2
Anthony Goonetilleke
Esteemed Contributor

Re: How can I implement anonymous ftp?

Have a look at the HP doc id A4747623.
It tells you how to setup anonymous ftp.


To configure anonymous FTP, execute the following:

1. Edit /etc/passwd file:
a. vi /etc/passwd
Add a line for user ftp. For example:
ftp:*:guest:anonymous ftp:/home/ftp:/usr/bin/false

2. Create the ftp home directory:
a. cd /home
b. mkdir ftp

3. Create the subdirectory /usr/bin under the ftp home directory:
a. cd /home/ftp
b. mkdir usr
c. cd usr
d. mkdir bin

4. Copy the ls and pwd command from /usr/bin to ~ftp/usr/bin.
Set permissions to executable only 0111:
a. cp /usr/bin/ls /home/ftp/usr/bin
b. cp /usr/bin/pwd /home/ftp/usr/bin
c. chmod 0111 /home/ftp/usr/bin/ls
d. chmod 0111 /home/ftp/usr/bin/pwd

5. Set the owner of ~fpt/usr/bin and ~ftp/usr directories to root.
Set permissions to not writable 0555:
a. chown root /home/ftp/usr/bin
b. chmod 0555 /home/ftp/usr/bin
c. chown root /home/ftp/usr
d. chmod 0555 /home/ftp/usr

6. Create the subdirectory etc under the ftp home directory:
a. cd /home/ftp
b. mkdir etc

7. Copy /etc/passwd and /etc/group to ~ftp/etc:
a. cp /etc/passwd /home/ftp/etc
b. cp /etc/group /home ftp/etc

8. Replace the password field in all entries in /home/ftp/etc/passwd
with *. Delete the shell field from each entry:
a. vi /home/ftp/etc/passwd
--ftp:*:500:guest:anonymous ftp:/home/ftp:
--acb:*:8996:20::/home/acb:

9. Replace the password field in all entries in /home/ftp/etc/group
with *.
a. vi /home/ftp/etc/group
--users:*:20:acb
--guest:*:21:ftp

10. Set the owner of the files in ~ftp/etc to root. Set permissions
to read only 0444:
a. chown root /home/ftp/etc/passwd
b. chmod 0444 /home/ftp/etc/passwd
c. chown root /home/ftp/etc/group
d. chmod 0444 /home/ftp/etc/group

11. Set the owner of ~ftp/etc to root. Set permissions to
not writable 0555:
a. chown root /home/ftp/etc
b. chmod 0555 /home/ftp/etc

12. Create a directory called pub under ~ftp. Set owner to user ftp
and set permissions to writable by all 0777:
a. mkdir /home/ftp/pub
b. chown ftp /home/ftp/pub
c. chmod 0777 /home/ftp/pub

13. Create directory called dist under ~ftp. Set owner to root and
permissions writable only by root 0755:
a. mkdir /home/ftp/dist
b. chown root /home/ftp/dist
c. chmod 0755 /home/ftp/dist

14. Set owner of ftp home directory to root. Set permissions to not
writable 0555.
a. chown root /home/ftp
b. chmod 0555 /home/ftp
Minimum effort maximum output!
Venu_2
Regular Advisor

Re: How can I implement anonymous ftp?

Hi,

SAM
|
Networking and Communications
|
Network services
|
Anonymous FTP

regards

venu