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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Internal Commands Unavailable

Status
Not open for further replies.

StarTAC

ISP
Jun 23, 2000
424
GH
hi all..

i am having a problem with the internal ftp commands (ls, cd e.t.c).. they don't seem to work after i log in.. the error i get is 'Unknown Command'...

the only command that works is 'pwd'... any ideas why..?..

all help appreciated..
 
Which ftpd are you trying to use (wuftpd, vsftpd, ...)?Maybe you are trying to set up a chroot'd ftpd, and don't have the commands 'ls', 'pwd', etc available in the chroot'd $PATH? Or the uid the ftpd is running as may not have it's $PATH properly declared?

Just shots in the dark. I haven't ever set up an ftp server 'for real'. Just some experiments and kludges to get some files moved around.

----
JBR
 
i am running vsftpd with mysql auth.. login is fine, but no commands available.. it's been configured with chroot...

vsftpd is running under inetd... that shd give it enuff perms.. any ideas..

all help appreciated..
 

You need to copy the commands + needes libraries to the bin and lib directory under the chroot.

Cheers
 
hmmm... how is it so that i don't need to do this with the default WU-FTPD, or is it because i am doing chroot?

the commands i will be copy, will these be part of the normal Linux system commands e.g., /bin/ls e.t.c

all help appreciated..
 
Because you are running in a chroot environment the home directory for the user is the absolute parent directory (/) for that user. Therefore you need to provide the needed commands like ls, rm, etc. as the real system commands (/bin) aren't reachable.

The easiest way around it is to see if you have anonftp installed, find the home for that (probably somewhere like /var/ftp as it is in the case of Redhat 8) and copy the /bin, /etc/ and /lib dirs to your chroot directory. You may need to alter the passwd and group files found in this specific /etc dir.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Hi StarTAC & Co,

i've got a problem with my vsftpd. I want to authenticate users by a usertable within mysql.

But i don't know how. Can you help?

THX a lot!
 
i installed anonftp but only saw a few files in the bin/ directory.. 'cpio', 'gzip' e.t.c.

i didn't see 'ls', 'cd' e.t.c. any ideas..?..

all help appreciated..
 
i think am beginning to understand what the real problem is..

users can login fine, but when they try to issue in commands to interact with files, they don't get any response... it seems like the user doesn't have sufficient permissions to list the files in his home directory..

by the way, authentication is off a MySQL database, which has the username, password, shell type and home directory..

is it possible the user can't list the files in the directory, because of permission problems..?.. if so, how can this be rectified..?..

all help appreciated..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top