Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30672 - Overwrite in proftpd.conf is ignored in subdirs
Summary: Overwrite in proftpd.conf is ignored in subdirs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-08 08:10 UTC by Ole Tange
Modified: 2003-10-15 23:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Tange 2003-10-08 08:10:58 UTC
When uploading a file overwrite does not work in a subdir. It works nicely in the login directory. 
 

Reproducible: Always
Steps to Reproduce:
1. Put in proftpd.conf:  
AllowOverwrite on  
2. ftp localhost  
3. cd directory (important) 
4. upload file foo (put foo)  
5. overwrite file foo (put foo)  
  
Actual Results:  
550 foo: Overwrite permission denied 

Expected Results:  
200 OK
Comment 1 Ole Tange 2003-10-08 08:12:22 UTC
The bug is not present in 1.2.8. But present in 1.2.9_rc2.

emerge info
Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.2.5-r2,2.3.2-r1, 2.4.19-gentoo-r9)
=================================================================
System uname: 2.4.19-gentoo-r9 i686 AMD Athlon(tm) Processor
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /var/bind
/usr/X11R6/lib/X11/xkb /usr/kde/3/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs sandbox buildpkg ccache distcc userpriv"
GENTOO_MIRRORS=" http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/ http://gentoo.oregonstate.edu/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg gnome libg++ mad
mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms
xv zlib gtkhtml gdbm berkdb slang readline arts tetex bonobo svga tcltk guile
mysql postgres X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis
gtk qt kde motif opengl mozilla gphoto2 ldap cdr scanner curl ethereal flash
gd imap innodb ipv6 lmtp mbox mcal memlimit samba sasl snmp sox tiff -3dnow
-java"

Comment 2 Adam Bregenzer 2003-10-10 11:07:49 UTC
I also had this problem, I noticed in the proftpd-users mailing list that
it is a known proftpd bug that has a patch in cvs.  The bug is reported here:
http://bugs.proftpd.org/show_bug.cgi?id=2165

The patch is in the following bug:
http://bugs.proftpd.org/show_bug.cgi?id=2183

Here is the actual patch:
http://bugs.proftpd.org/attachment.cgi?id=1885&action=view


To get it to work on my system I made proftpd-1.2.9_rc2-r1.ebuild, here's
the patch:
--- proftpd-1.2.9_rc2.ebuild    2003-10-05 11:06:59.000000000 -0400
+++ proftpd-1.2.9_rc2-r1.ebuild 2003-10-10 13:51:08.000000000 -0400
@@ -28,6 +28,9 @@ DEPEND="net-libs/libpcap
 src_compile() {
        local modules myconf
  
+       # Apply overwrite fix - Bug 30672
+       epatch ${FILESDIR}/${P}-overwrite.patch
+
        modules="mod_ratio:mod_readme"
        use pam && modules="${modules}:mod_auth_pam"
        use tcpd && modules="${modules}:mod_wrap"

I also created proftpd-1.2.9_rc2-overwrite.patch with the following patch
in it:
--- proftpd/src/dirtree.c       9 Sep 2003 01:04:26 -0000
+++ proftpd/src/dirtree.c       28 Sep 2003 01:05:55 -0000
@@ -2136,7 +2136,7 @@
     else
       path = NULL;
  
-    if (path && *path) {
+    if (path) {
       if (*(path + strlen(path) - 1) == '*')
         *(path +strlen(path) - 1) = '\0';

I put these files in /usr/local/portage/net-ftp/proftpd/ and /usr/local/portage/net-ftp/proftpd/files/
respectively and ran:
ebuild /usr/local/portage/net-ftp/proftpd/proftpd-1.2.9_rc-r1.ebuild digest
emerge -u proftpd

This builds the checksums for the files and emerges proftpd with the patch.

Can someone clean this up as necessary and incorporate it into cvs for everyone?
Comment 3 Adam Bregenzer 2003-10-12 02:51:01 UTC
I think Bug 30004 and this bug are the same problem.  I have the same patch
as this bug for proftpd.
Comment 4 Nick Hadaway 2003-10-15 23:06:22 UTC
proftpd-1.2.9_rc3 is now in portage which should address this problem.