Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2002 06:15:25 -0700 (PDT)
From:      Nino Dehne <ndehne@clan-planet.ch>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/37250: [PATCH] ftpd(8) cannot delete stale symlinks
Message-ID:  <200204191315.g3JDFPY36910@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         37250
>Category:       bin
>Synopsis:       [PATCH] ftpd(8) cannot delete stale symlinks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 19 06:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nino Dehne
>Release:        FreeBSD 4.5-RELEASE-p2 i386
>Organization:
Clan-Planet GmbH
>Environment:
FreeBSD [...] 4.5-RELEASE-p2 FreeBSD 4.5-RELEASE-p2 #1: Tue Mar 19 18:17:09 CET 2002 root@[...] i386
>Description:
When trying to delete a file via ftp(1) (or any other client, it doesn't matter), ftpd(8) does a stat(2) on the file to verify it's there. However, if the file to delete is a symlink the target of the link gets checked, not the link itself thus making stale links impossible to delete via ftp.

This occured when local users had symlinks in their home which point to /usr/local/something but are rendered stale when users log in via ftp (due to using chroot() feature of ftpd(8)).
>How-To-Repeat:
Create a symlink inside a user's home which points outside of the user's home. Log in as that user via ftp while chroot()'ing him using /etc/ftpchroot. Try to delete said link.

This should also work with "ordinary" stale symlinks, i.e. not involving any chroot'ing behaviour of ftpd(8).
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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