Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Nov 2005 13:07:27 -0600
From:      Joseph Kerian <jkerian@gmail.com>
To:        Leo Lapousterle <lapousterle@wanadoo.fr>, questions@freebsd.org
Subject:   Re: Cross device link / FTP
Message-ID:  <282b2dd90511021107y6fb8f70ch3e7a81f09a18499a@mail.gmail.com>
In-Reply-To: <0F2B23E8833AF59E49D1C3E1@cc-110.int.t-online.fr>
References:  <0F2B23E8833AF59E49D1C3E1@cc-110.int.t-online.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/2/05, Leo Lapousterle <lapousterle@wanadoo.fr> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?282b2dd90511021107y6fb8f70ch3e7a81f09a18499a>