Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Chrooted sftp on rhel3

Chrooted sftp on rhel3

2007-06-15       - By Johan Booysen

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Hi everyone,

I'm doing some tests setting up an sftp server, with setting up a chroot
jail for ftp users.

Everything seems to be working fine, but "ftpuser" can cd to outside his
home directory (ftpuser cannot access the user1 or user2 directories,
but can get to etc, lib, and user), which ideally I don't want.  I've
played around with setting different permissions, but only the
permissions below seem to work.

In /etc/rssh.conf, I've got the following to set the chroot path:
chrootpath = /home

# pwd
/home
# ls -l
total 24
drwxr-xr-x    2 root     root         4096 Jun 15 10:41 etc
drwx-- ---    3 ftpuser  ftpuser      4096 Jun 15 11:20 ftpuser
drwx-- ---    4 user1    user1        4096 May 25 15:27 gmi
drwx-- ---    5 user2    user2        4096 Jun 14 16:54 jhb
drwxr-xr-x    3 root     root         4096 Jun 14 17:28 lib
drwxr-xr-x    6 root     root         4096 Jun 14 17:26 usr

I've then also removed all entries from the copy of the passwd file in
/home/etc/passwd, so that only the ftp users' accounts appear in it.

Any ideas on how to restrict access so ftp users are locked into their
own home directories - if that is even possible?  It doesn't seem like
much of an issue to me, but I'd appreciate your thoughts.

Thanks very much.

Johan

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list