Re: pure-uploadscript problem

Aaron Barrus <[email protected]> Thu, 15 Dec 2005 22:52:44 -0700
Newsgroups gmane.network.pureftpd.user
Message-ID <[email protected]>
Hi all,  
   
my server is behaving exactly this way.  I'm running 1.0.20.  My configure looks like:  
   
 ./configure --with-puredb --with-throttling --with-uploadscript --with-boring --without-banner --with-uploadscript
  
the upload script just never seems to *run*.  I'm calling pure-uploadscript like:  
   
 /usr/local/sbin/pure-uploadscript -u 0 -g 0 -r /uploadscript/pure-uploadscript.sh   
   
All my pure-uploadscript.sh contains is:  
   
echo $1 > /uploadscript/pure_uploadscript.log  
   
permissions on the pure-uploadscript.sh are 777, and the permissions for the parent directory /uploadscript are also 777.  I can't think of anything that would keep it from running.  It's running a file that anybody could run, and echoing to a log with permission for anybody to write to.  
   
Running strace on pure-uploadscript results in the same outcome as Pedro's below.  
   
If this was ever solved, please let me know!  I know I've used previous versions with this working.  
   
Thanks!  
   
Aaron
      _____  

  From: pedro [mailto:[email protected]]
To: [email protected]
Sent: Thu, 15 Sep 2005 05:08:51 -0600
Subject: Re: [pureftpd] pure-uploadscript problem

On 9/15/05, Tracer Bullet <[email protected]> wrote:
> On Wed, 2005-09-14 at 02:08 +0200, pedro wrote:
> > Hello,
> >
> > Im using the latest PureFTPd version (1.0.20) and I cannot get
> > pure-uploadscript to work. I have compiled with
> >
> > ./configure --with-altlog --with-quotas --with-ftpwho --with-largefile
> > --with-virtualhosts --with-virtualchroot --with-ratios
> > --with-throttling --with-boring --with-uploadscript
> > --with-language=spanish --with-language=catalan --with-language=dutch
> > --with-language=english --with-mysql --with-paranoidmsg
> > --cache-file=config.cache --without-inetd --without-pam --without-ldap
> > --without-extauth --without-shadow --with-brokenrealpath
> >
> > Im running it as a standalone server with the following options:
> >
> > /usr/local/sbin/pure-ftpd -A -b -B -X -E -R -U 022:022 -u 999 -S 21 -l
> > mysql:/usr/local/etc/pure-mysql.conf -O clf:/var/log/pureftpd.log -t
> > 256:128 -o &
> >
> > and:
> >
> > /usr/local/sbin/pure-uploadscript -r -u 0 -g 0 /root/upload-script &
> >
> > Everything works great apart from pure-uploadscript. Does anyone know
> > where to look for clues?
> 
> The path to the script should be an argument to the -r flag. That is,
> you should start pure-uploadscript like so:
> 
> /usr/local/sbin/pure-uploadscript -u 0 -g 0 -r /root/upload-script &
> 


Hello,

I did run pure-uploadscript as you suggested after running pure-ftpd
but still no luck. I also ran a strace like that:

/usr/local/sbin/pure-ftpd -A -b -B -X -E -R -U 022:022 -u 999 -S 21 -l
mysql:/usr/local/etc/pure-mysql.conf -O clf:/var/log/pureftpd.log -t
256:128 -o &

strace /usr/local/sbin/pure-uploadscript -u 0 -g 0 -r
/purescript/uploadscript.sh

This is what strace shows after uploading test.txt:

"\2", 1) = 1
read(0, "m", 1) = 1
read(0, "e", 1) = 1
read(0, "l", 1) = 1
read(0, "i", 1) = 1
read(0, "m", 1) = 1
read(0, "a", 1) = 1
read(0, "t", 1) = 1
read(0, "o", 1) = 1
read(0, "\1", 1) = 1
read(0, "/", 1) = 1
read(0, "h", 1) = 1
read(0, "o", 1) = 1
read(0, "m", 1) = 1
read(0, "e", 1) = 1
read(0, "/", 1) = 1
read(0, "m", 1) = 1
read(0, "e", 1) = 1
read(0, "l", 1) = 1
read(0, "i", 1) = 1
read(0, "m", 1) = 1
read(0, "a", 1) = 1
read(0, "t", 1) = 1
read(0, "o", 1) = 1
read(0, "_", 1) = 1
read(0, "c", 1) = 1
read(0, "o", 1) = 1
read(0, "m", 1) = 1
read(0, "/", 1) = 1
read(0, "t", 1) = 1
read(0, "e", 1) = 1
read(0, "s", 1) = 1
read(0, "t", 1) = 1
read(0, ".", 1) = 1
read(0, "t", 1) = 1
read(0, "x", 1) = 1
read(0, "t", 1) = 1
read(0, "\0", 1) = 1
lstat64("/home/melimato_com/test.txt", {st_mode=S_IFREG|0755,
st_size=96, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7ef7b88) = 28806
waitpid(28806, NULL, 0) = 28806
--- SIGCHLD (Child exited) @ 0 (0) ---
read(0, 


So I guess pure-uploadscript does run after a file has been uploaded,
the problem is it either does not run my script or the script doesn't
work.
Can anyone see what I'm doing wrong?

Thanks!

Pedro.

---------------------------------------------------------------------
To post a new message, e-mail: [email protected]
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]