- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftpaccess : directories seems empty
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 04:08 AM
01-28-2005 04:08 AM
I've just set up ftpaccess file on a server. Everything runs fine. Normal users can use ftp just has they done before, and one particular ftpuser is chrooted.
If I use a DOS client, ftp will display content of directories when using ls. If I use any other client, directory seems empty (but I can cd to a subdirectory).
What's that ?
Examples :
--- from DOS client
T:\>ftp serva
Connecté à serva.
220 serva FTP server (Version 1.1.214.8 Fri Apr 20 07:27:42 GMT 2001) ready.
Utilisateur (servb:(none)) : ftpuser
331 Password required for ftpuser.
Mot de passe :
230 User ftpuser logged in. Access restrictions apply.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
toto
226 Transfer complete.
ftp : 6 octets reçus dans 0,00Secondes 6000,00Ko/sec.
ftp> cd toto
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
file.txt
226 Transfer complete.
ftp : 10 octets reçus dans 0,00Secondes 10000,00Ko/sec.
ftp> quit
221 Goodbye.
---
--- from other client (HP-UX for this example)
root@servb:/ >ftp serva
Connected to serva.
220 serva FTP server (Version 1.1.214.8 Fri Apr 20 07:27:42 GMT 2001) ready.
Name (serva:root): ftpuser
331 Password required for ftpuser.
Password:
230 User ftpuser logged in. Access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
ftp> cd toto
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
ftp> quit
221 Goodbye.
---
Note that there is no error. Only directory content is not listed.
Regards,
Fr
"Reality is just a point of view." (P. K. D.)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 04:12 AM
01-28-2005 04:12 AM
SolutionYou probably need to copy the /sbin/ls into $USER_HOME/usr/bin/ls instead of using the regular /usr/bin/ls. This is because /sbin/ls is statically linked and does not need libraries that are required in executing /usr/bin/ls.
Say the chrooted directory for the use is /some_path/userid. Copy /sbin/ls to /some_path/userid/usr/bin/ls.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 04:12 AM
01-28-2005 04:12 AM
Re: ftpaccess : directories seems empty
I'm assumping by DOS ftp, you are referring to the one built in by Microsoft.
Thats a very problematic client.
For the chroot user, the most likely reason for not being to see any files, is a lack of access to the /usr/bin/ls utility, which ftp uses. You'll note that ls command line options work a normal session.
You'll need to copy ls binary into the login directory or a subdirectory(usually called bin) so that the ls command works for the chroot user.
Also note OT: I posted the version numbers on that samba/cifs Linux thread.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 04:43 AM
01-28-2005 04:43 AM
Re: ftpaccess : directories seems empty
I didn't realized that it was a real chroot. I believed that ftpd was restricting accesses, but in fact, ftp process is chrooted.
mkdir $USER_HOME/bin
cp /sbin/ls $USER_HOME/bin/ls
and all is good.
What I still don't understant is why DOS client sees content ?
Thanks,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 04:49 AM
01-28-2005 04:49 AM
Re: ftpaccess : directories seems empty
My opinion is that the dos ftp client has the ls command builtin, like "DIR" is a intrinsic command for the command.com for DOS. On the other hand the unix ftp client uses /usr/bin/ls for the ls command.
Hope this helps.
Regds