ftp chroot

Nikos Mavroyanopoulos nmav at hellug.gr
Thu Nov 18 16:26:36 EET 1999


On Thu, Nov 18, 1999 at 12:18:53PM +0200, Antonis Malihutsakis wrote:
> Psaxnw na brw pws mporw na kanw chroot se kapoious ftp xrhstes.
> p.x o xrhsths user1 me home dir /www/user1 otan kanei login na mhn
> mporei na dei to filesystem, otan dhladh kanei change directory / na
> phgainei sto /www/user1.
κανεις ένα προγραμματάκι που να  έχει το
chroot("/www/user1");
ρίχνει τα priviledges και μετά τρέχει το shell. 
Υστερα το κάνεις suid. Πρόσεχε να αλλάζει το περιβάλλον ανάλογα,
πχ το HOME από /www/user1 να το αλλάξει σε /user1 ή / ανάλογα την
περίπτωση.

> An ginetai 8a h8ela na na ma8w kai ti xreiazetai gia na mporei autos o
> xrhsths na ektelei entoles opws ls, cp, klp. kai na mporei na allazei to
> password tou kanontas telnet.
Να μην τον κάνεις chroot:)
Πρέπει να αντιγράψεις τα sh,ls,cp, κλπ σε ένα κατάλογο bin/ στο directory
του, μαζί με την libc στο lib/. Πιο καλό είναι να έχεις όλους
τους χρήστες μαζί, και ξεχωριστά απο το υπόλοιπο σύστημα.
πχ τους κάνεις chroot στο /users, όπου έχεις βάλει ενα κοινό bin
και lib.

-- 
Nikos Mavroyanopoulos
mailto:nmav at hellug.gr
I may not be perfect, but parts of me are excellent.
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list