From owner-freebsd-questions@FreeBSD.ORG Wed Nov 2 19:07:29 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC81516A41F for ; Wed, 2 Nov 2005 19:07:28 +0000 (GMT) (envelope-from jkerian@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58D6343D46 for ; Wed, 2 Nov 2005 19:07:28 +0000 (GMT) (envelope-from jkerian@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so82383wri for ; Wed, 02 Nov 2005 11:07:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=hl8QzsOIHbHSBdw6mHoUutrko7hLsEQiUp24ExRXjn64WD2S6KDO8dIv/3qH3OWD4fYnZ4stld5VKE0Fob/4V+GyC2gW1mtxx57KPCyCduCpnc/DB/OBE8z8FAYYd3h9f+6uUoYe6V5/Um4Y3cZtUrfX4r+MDM2zoIIVpju+uuQ= Received: by 10.54.115.3 with SMTP id n3mr2204263wrc; Wed, 02 Nov 2005 11:07:27 -0800 (PST) Received: by 10.54.100.15 with HTTP; Wed, 2 Nov 2005 11:07:27 -0800 (PST) Message-ID: <282b2dd90511021107y6fb8f70ch3e7a81f09a18499a@mail.gmail.com> Date: Wed, 2 Nov 2005 13:07:27 -0600 From: Joseph Kerian To: Leo Lapousterle , questions@freebsd.org In-Reply-To: <0F2B23E8833AF59E49D1C3E1@cc-110.int.t-online.fr> MIME-Version: 1.0 References: <0F2B23E8833AF59E49D1C3E1@cc-110.int.t-online.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Cross device link / FTP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 19:07:29 -0000 On 11/2/05, Leo Lapousterle wrote: > > Hello :) > > I've set up a FTP server on my FreeBSD 5.2.1-RELEASE. I've added a hard > drive to extend the storage capability. So my main FTP server is /Ftp and > the extension is in /Ftp2. > > There's a problem with links: I made a symlink (ln -s) from /Ftp/example > to > /Ftp2/example/, but when I move a folder from /Ftp in "example", my FTP > client tell me : "150 - Cannot rename/write: Cross device link". > > My FTP server is Pure-FTPd, the symlink's owner has good UID/GID, chmod > allows the ftp user to access "example" for writing. > > If someone has an idea, this problem is getting me mad :) > > Thanks! > > -- > L=E9o Lapousterle - Paris, France Hmm... interesting. I just tried this on my system. Sure enough, uploading and downloading through those symlinks works fine, but not moving a file. I found the problem on line 4024 of the ftpd.c file in pure-ftpd. It uses the rename command to move the files, which will fail if the files are on different file systems. Do you explicitly require this functionality in the ftp server, rather than just performing this via a shell session? The problem is that there is not = a similer C function call for "copy", so you can't just drop a replacement in= . I would consult with the pure-ftpd mailing list on this. The quick and easy solutions to this are glaring security holes, so I might consult with them over a way around this. Joe