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

Disable browser ftp root dir access

Status
Not open for further replies.

wachuna

Technical User
Mar 10, 2004
14
0
0
US
Hi,

Right now if I ftp to a Solaris 9 server using a browser, my default dir is /, I would like to know how to disable this. Command line ftp as same user is OK. Anonymous is disabled and I've created an ftp user with a home directory of /SRftp/pub.

I've applied the ftp patch 114564-13. Here's my upload line in the ftpaccess file:
upload /SRftp * no
upload /SRftp /pub no SR_radionews Staff nodirs
In the inetd.conf I'm using -adl for the in.ftpd.

Do you know why browser ftp is still taking me into /?

Thank You
 
it says / but is it the dir /SRftp/pub? (put a file there and see if you see it.)

As I remember, when using Explorer browsing it always think it is putting you in /, it won't show the true path, so I don't think you can do a virtual "cd .." (don't remember) like you can using command line ftp.

If you are considering to do anything tricky with chroot or access control, consider using vsftpd, which works tons better. Trying to chroot to the standard ftpd is doable (I have done it) but not worth the effort anymore since vsftpd was out.

eugene



 
It really is in /. It's displaying files and folders in the root directory of the server. If you click on a file, it'll display it. You can also navigate into folders and display files, not good. I'm not planning to do anything complex. Local users will upload files via Samba share. Remote user will only download.

Thanks
 
This doesn't sound right.

And you are either encoding the ftp login/password in the URL, or I believe IE has an option to have it ask you?

It really sounds like it is dropping you into anonymous mode, perhaps setting anonymous-root to another path in ftpaccess.

eugene

 
Also, check the log files to make sure the user is authenticating as you think.

eugene
 
man and google chroot

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Log shows:
FTP LOGIN REFUSED (ftp not in /etc/passwd) FROM
10.6.1.3 [10.6.1.3], anonymous

Does this mean there's an anonymous setup somewhere?
I'll do some reading on "chroot"

Thank You
 
There is some useful information about configuring a chroot environment for FTP on the Solaris ftpd man page.

Annihilannic.
 
Hmm. anonymous was bounced. But you still got a page, I am assuming that is an IE cache page.

Test with command line ftp only, once that is correct then you can use the IE interface and avoid browser weirdness.

eugene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top