-----Original Message----- From: Crispin Wellington [mailto:[EMAIL PROTECTED] Sent: 29. april 2002 07:00 To: debian-user@lists.debian.org Subject: Re: mount troubble
On Sun, 2002-04-28 at 02:33, Ernst-Magne Vindal wrote: > Hi all > > Im haveing this troubble with mounting a folder from on disk to a folder > on another. > The scenario is something like this: > I'm running an ftp server just for a few of my friends and let them log > into their home directories. I have there created a folder "ftp". I have > then a folder on another disk for the ftp stuff called /ftpd/download. > > I wish to mount /ftpd/download to /home/<user>/ftp. > > I have tried to use mount -o bind /ftpd/download /home/<user>/ftp > without any luck. > I am really not sure about the "bind" option, it was something i picked > up on the net, but I'm sure that both mount and smbmount is supported by > the kernel, that is I can mount with vfat and msdos and samba/windows > share. > > If I mount an msdos partition it's ok, but i I try with the -o bind > option, I get the error message : > "mount, not supported by kernel" > > My wish is to let the users log into their home dir's and lock them > there, with exeption of the mounted folder. > I have also tried vith symbolic links, but that gives the users access > all the way down to /. > I am running woody with 2.2-20 kernel. > > Any ideas? To lock them there, you really need to run the ftp server in a chroot environment. You could setup a chroot environment for your ftp server on a directory and then *hardlink* /chrootbase/home/username to the users home directory. Only hardlinks can break out of a chroot jail. For a hardlink to work it must be on the same physical disk partition. Yes, I could do that. But the problem is as you say that hardlinks need to be on the same physical disk. Thats my problem. I got one small 4G disk for system and users and two more disks for ftp and other stuff. Looks like I need to solve the problem I got with the 2.4-x kernel. I'm running woody and 2.4.-18 on my laptop (dell inspiron 4000) with no problems, but this (ftp)server is an old IBM Aptiva 166mmx, wich I have not been able to boot up again after compiling new kernel, from 2.2-20 to 2.4-18. Because with the 2.4 kernel I can use the mount --bind option. Then I can mount one folder to another, including folder from one disk to another. Another way would be to lock them via the protocol. Like an ftp server that allows very precise Access Control Lists that will deny the listing of any directories not specified (for *any* user logged in, not just anonymous). I'm not sure of a server that does this. You may want to do an appraisal of their features. That's also a solution, just hoped I could solve this in an not so "advanced" way:) Thanks for help /ernst Kind Regards Crispin Wellington -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]