www.ProFTPD.de
13. März 2007, 18:19:30 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
News: SMF - Neu installiert!
 
   Übersicht   Hilfe Suche Login Registrieren  
Seiten: [1]   Nach unten
  Drucken  
Autor Thema: Call external script with sfv checker ?  (Gelesen 1495 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
gnomito
Gast
« am: 24. Mai 2004, 19:15:57 »

Hi,  

i need help with sfv checker:

I'd like to use sfv checker to call an external script everytime a file is uploaded to the ftp server. The server only accepts .jpg files. All users are banned to their respective user dirs (DefaultRoot ~). First  i tried to use mod_exec, but unfortunately their are some problems with DefaultRoot ~. So it comes to sfv checker.

I just installed sfv checker on my system (Suse 9.0 / ProftpD  1.2.9). Everything seems to work fine. Then i changed the ftpsvcheck.pl script with the following entry:

system("/opt/blabla/thconvert.sh ".$filename);

thconvert.sh is a shell script invoking ImageMagick's 'convert'  with a given filename (absolute path to file) and a definite size for resizing the jpeg.

But this doesn't work. Doesn anybody know what's wrong here. ?

Thx for your help.
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #1 am: 24. Mai 2004, 19:52:49 »

Zitat von: "gnomito"
Hi,  

i need help with sfv checker:

I'd like to use sfv checker to call an external script everytime a file is uploaded to the ftp server. The server only accepts .jpg files. All users are banned to their respective user dirs (DefaultRoot ~). First  i tried to use mod_exec, but unfortunately their are some problems with DefaultRoot ~. So it comes to sfv checker.

I just installed sfv checker on my system (Suse 9.0 / ProftpD  1.2.9). Everything seems to work fine. Then i changed the ftpsvcheck.pl script with the following entry:

system("/opt/blabla/thconvert.sh ".$filename);

thconvert.sh is a shell script invoking ImageMagick's 'convert'  with a given filename (absolute path to file) and a definite size for resizing the jpeg.

But this doesn't work. Doesn anybody know what's wrong here. ?

Thx for your help.


you may also consider to use mod_exec in combination with mod_vroot. See www.castaglia.org for more details..
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Gnomito
Gast
« Antwort #2 am: 28. Mai 2004, 14:12:05 »

Zitat von: "stonki"
you may also consider to use mod_exec in combination with mod_vroot. See www.castaglia.org for more details..


Hi Stonki,

thx for your reply, but unfortunately the sources of mod_exec and mod_vroot on www.castaglia.org are released for different versions of Proftpd. Thus it was not possible to compile reasonably both packages at the same time / version of proftpd. Do you know where to get a version of mod_exec for proftp 1.2.9 ? Because i'm using proftpd on a production system I prefer to use v1.2.9 'til release 1.2.10 is 'stable'.

Thanks. Your help would be very appreciated.
Gespeichert
Anonymous
Gast
« Antwort #3 am: 28. Mai 2004, 14:46:02 »

I already found an older version (0.7) of mod_exec on my backup. But now Proftpd seems to forget about mod_vroot:

cluster2:/etc/proftpd # /etc/init.d/proftpd start
Starting ProFTPD  - Fatal: VRootOptions: : unknown ExecOption: 'AllowSymlinks'
startproc:  exit status of parent of /usr/local/sbin/proftpd: 1  failed

Some global settings in proftpd.conf:

VRootEnine on
VRootOptions AllowSymlinks
ExecEngine on

[/code]
Gespeichert
Anonymous
Gast
« Antwort #4 am: 28. Mai 2004, 14:49:08 »

Lächelnd  Lächelnd
VRootOptions AllowSymlinks  -> VRootOptions allowSymlinks
Gespeichert
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #5 am: 28. Mai 2004, 14:53:56 »

mod_exec for 1.2.9rc2 or later:
http://castaglia.proftpd.de/proftpd/modules/proftpd-mod-exec-0.7.tar.gz

mod_vroot for 1.2.9rc2 or later:
http://castaglia.proftpd.de/proftpd/modules/proftpd-mod-vroot-0.6rc1.tar.gz
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
TL
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 97


Profil anzeigen WWW E-Mail
« Antwort #6 am: 31. Mai 2004, 22:50:35 »

Zitat von: "gnomito"
Hi,  

i need help with sfv checker:

I'd like to use sfv checker to call an external script everytime a file is uploaded to the ftp server. The server only accepts .jpg files. All users are banned to their respective user dirs (DefaultRoot ~). First  i tried to use mod_exec, but unfortunately their are some problems with DefaultRoot ~. So it comes to sfv checker.

I just installed sfv checker on my system (Suse 9.0 / ProftpD  1.2.9). Everything seems to work fine. Then i changed the ftpsvcheck.pl script with the following entry:

system("/opt/blabla/thconvert.sh ".$filename);

thconvert.sh is a shell script invoking ImageMagick's 'convert'  with a given filename (absolute path to file) and a definite size for resizing the jpeg.

But this doesn't work. Doesn anybody know what's wrong here. ?

Thx for your help.


Sorry for the late reply, I was on vacation  Cool

This would be the correct script:
Code:
#!/usr/bin/perl
if (@ARGV != 1)
{
  print("Usage: ftpsfvcheck.pl filename\n");
  exit(-1);
}
system("/opt/blabla/thconvert.sh " . @ARGV[0]);
exit(0);

Hope this helps...
Gespeichert
Seiten: [1]   Nach oben
  Drucken  
 
Gehe zu:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS
Seite erstellt in 0.059 Sekunden mit 18 Zugriffen.