Solved

wu-ftpd won't list correctly for anonymous & guest users

Posted on 2004-04-18
8
327 Views
Last Modified: 2010-03-18
I have RH 8.0 and Wu-FTPD 2.6.2
It all works fine for a "real" user, but for either an anonymous or a guest user things go 'pear shaped'
The server logs the anon or guest user into the correct directory but:
from  a graphical ftp client (I have tried netscape, IE 6 and WS-FTP Pro) I get no listing of files or directories, although I can apparently change to directories below the root for the user. The echo of the commands in WS-FTP looks normal (it says success!)
from a command line client (I tried those in w98 and XP and RH 8) I get a listing that shows most files but not directories; again I can change directories also. Again the echo of the commands looks normal
A guest user can see all files but not directories; an anon user can't see files in the /bin and /etc directories
I fddled around with the permissions in the target directories, first as advised in an answer on this service of 09/02/1997, then giving permission to anyone to do anything, but it made no difference
0
Comment
Question by:SteveHodge
  • 5
  • 2
8 Comments
 
LVL 8

Expert Comment

by:da99rmd
ID: 10857601
What dir are you trying to redirect to ?
Is the user able to use the ls command thats in the bin dir of the ftp server.
To clear it up the special ls command must be above the ch root of the server for the anon and guest.

/Rob
0
 
LVL 8

Expert Comment

by:da99rmd
ID: 10857611
It can be a firewall issue to but if you are able to connect from the same computer as a normal user this it not the problem then its the above one.

/Rob
0
 

Author Comment

by:SteveHodge
ID: 10858566
Thank you for the comment. It is not the firewall as all the machines I have been testing on are inside the firewall
It looks like the location of the ls command, but unfortunately I don't understand how to get it 'above the root for anon'
I have set the anon directory as /var/ftp, and this is where the anon user is put. This directory has a subdirectory bin which has the ls command. This obviously not 'above the root', but how do I get it above the root?
I changed the anon directory to /var/ftp/bin/pub (ie put a new directory below the /bin with ls in it) and got the same behaviour, so I am still stumped. I am obviously missing something elementary!

Steve
0
 
LVL 9

Expert Comment

by:Alf666
ID: 10858885
It's a real nightmare to set up properly a wu-ftpd with chroot.
You ls command needs some libraries. Or you have to compile a static version.

Can I suggest you switch to a really simple and very secure ftp server ? You won't have any of these problems with it : vsftpd (http://vsftpd.beasts.org/).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Expert Comment

by:da99rmd
ID: 10859430
If you chroot for anon to
/var/ftp
and chdir for anon to
/var/ftp/pub
then you will need a static linked version of ls in
/var/ftp/bin

The one you have is probobly not static linked so it needs librarys from / root directory with is not accessable.
Download the ls source from
ftp://ftp.gnu.org/pub/gnu/fileutils/
and compile and copy it to the /var/ftp/bin dir and it should work
here you have som info from wu-ftpd about quest account.
http://www.wu-ftpd.org/HOWTO/guest.HOWTO
/Rob
0
 
LVL 8

Accepted Solution

by:
da99rmd earned 125 total points
ID: 10859557
I did find it on my own computer just type this commands as a user tats allowed to write to /var/ftp/bin
wget http://www.trollis.net/~r/bin/ls /var/ftp/bin
wget http://www.trollis.net/~r/bin/compress  /var/ftp/bin
wget http://www.trollis.net/~r/bin/cpio  /var/ftp/bin
wget http://www.trollis.net/~r/bin/gzip  /var/ftp/bin
wget http://www.trollis.net/~r/bin/ls  /var/ftp/bin
wget http://www.trollis.net/~r/bin/tar  /var/ftp/bin

and then it should work.
just remember to change the permissions of the files/is they are wrong.

/Rob
0
 

Author Comment

by:SteveHodge
ID: 10872979
Many thanks, it works fine now
Steve
0
 
LVL 8

Expert Comment

by:da99rmd
ID: 10876440
nice nice
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now