Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

installing ftp on Solaris 8

Status
Not open for further replies.

ek33

Programmer
Mar 27, 2002
8
US
I am installing an ftp server under Solaris 8 and am running into 2 problems I don't understand.

background info:
I am not installing anonymous ftp but am trying to add a single user for ftp in a restricted area.

I followed the instructions on the manpage to set up a root area, ~ftp, with ~ftp/etc, ~ftp/bin, etc. and copied all the appropriate files over.

My system is running NIS for normal logins and I am setting up this new login locally.

The ftp service is running through inetd and all the entries in /etc/inetd.conf and /etc/services are as they were after installing the OS.

Problems:

1. After logging in, the "ls" is not displaying anything. It tells me "200 PORT command successful" but does not display the directory structure I set up. It also says it is executing /bin/ls even though I put ls in ~ftp/bin. The entire message is:
ftp>ls
200 PORT command successful
150 ASCII data connection for /bin/ls (xx.xx.xx.xx,33034) 0 bytes
226 ASCII Transfer complete

2. I am able to "cd .." and go anywhere on the system as this user and would like the user to see this home area as / and only have access from there forward.

What I tried:

I read that "chroot" is a way to restrict the user to an area, but am getting an error message when executing this. I am typing "chroot /export/home/ftp /usr/sbin/in.ftpd" and getting the response, "chroot: No such file or directory" even though both the arguments are where they say they are.

Any help is much appreciated.

EK
 
Which ftp server? wu-ftp? It is a bit tricky, let me know if it's wu-ftp and I will hunt the page down for you.

The chroot bit is easy to solve, for the "ls" you need some static stuff in the ftp's home directory. IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
The ftp server is in.ftpd, the ftp daemon for Solaris 8.

You said I need some static stuff in the ftp directory for "ls" to work? What stuff is that?

Some further info:
I set up an anonymous login to see if the behavior would be different and it was. The anonymous login went to the same directory, ~ftp, but when I do a "pwd", it replys "/", not "~ftp" as is the case of the other login.

Thanks for your help.

EK
 
I think what aixmurderer means by 'static stuff' is just a couple of 'junk' files which have no use in the directory other than to appear in an ls listing. You can create these using:

touch junk
touch junk1
.....
etc

HTH
 
There is a directory structure set up already, and I added a couple of files to the home directory. Still ls shows me nothing at all.

I still haven't made any headway on this so if there are more ideas out there, I'd appreciate it.

Thanks,
EK
 
Did you try "ls -la"? IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
Have a look at this page, perhaps you will get some pointers there. It is wu-ftp specific, but some things may solve your problem:

IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
I found the problem. There are 2 versions of ls on the system. One in /usr/bin and one in /usr/ucb. The one in /usr/ucb works with ftp, but not the other. I had originally copied the one in /usr/bin to ~ftp/bin. Not sure why this is. They both work in the shell although the one in /usr/ucb has a display like "ls -aF".

Thanks for the responses.

EK
 
The commands on /usr/bin are solaris ( sunos4 ) commands
The commands in /usr/ucb are sunos4 commands (for backwards compatibility )
 
sory typo above
The commands on /usr/bin are solaris ( sunos5 ) commands
The commands in /usr/ucb are sunos4 commands (for backwards
compatibility )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top