Operating System - HP-UX
1838669 Members
5749 Online
110128 Solutions
New Discussion

Re: chroot/ftp browser issue

 
Kamlesh Shete
Advisor

chroot/ftp browser issue

Hi all,

I have implemented restricted access for users to get into our ftp server. The server is on hpux 11.0 and is a trusted system.

Have implemented chroot, where the user lands in his home directory (but the directory looks like root directory to user). This works just fine on commandline ftp, but when I use any browser (both IE and Netscape) all I see is a blank page on the browser. Also the syslog says that the ftp session is closed.

Any thoughts, ideas why this is not working

Regards.

SK
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: chroot/ftp browser issue

Typically ftp from a browser is anonymous unless otherwise specified.

Are you using this syntax in your browser FTP?

ftp://userid:passwd@hostname.domain.com
Kamlesh Shete
Advisor

Re: chroot/ftp browser issue

Hust got it working.

The reason was that in the group file for the ftpgroup I had no space after the comma between users. ( weird, but when I gave a space bet. users it just started working).

I also noticed that if the user has the ftpgroup as the primary group in the passwd file it doesnt' work. So if I change it to any other group it does

Thanks for the reply Patrick.

Scott Van Kalken
Esteemed Contributor

Re: chroot/ftp browser issue

As you're making the home directory the FTPROOT, there is no way to be able to do an ls as there is no common place where binaries live to do this.

Remember /home/scott is now the root directory.

you need to have /home/scott/usr/bin/ls

the ls binary - for this to work.

I suspect that if you actually log in via the command line, and type "dir" you wont see anything either.

you must use the non linked version of ls which is in /sbin/

In short:
- create /usr/bin/ in the virtual root dir.
- copy /sbin/ls into that dir.
- make the permissions such that "everyone" can at least read and execute the ls binary.

it should work.

I ran into this EXACT problem when setting up virtual root DIRS for our clients (only a handful) on one of our systems.

If you go to say ftp.hp.com you will see both bin and usr directories. I suspect that HP are also using a virtual root on some server, but you need the ls binary to be able to see anything.

I know this is a bit bodgy and probably doesn't make sense as I haven't explained myself well, but this is why you don't see anything.

Try it with just one user and log in, see what happens.

Scott.