egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
l.kleijn
Voice


Joined: 18 May 2014
Posts: 15

PostPosted: Wed Mar 14, 2018 4:55 am    Post subject: FTP help Reply with quote

Code:
set serverpath "/media/Media"
set eggpath "/home/leon/eggdrop"
set ftpuser "xxxxx"
set ftppass "xxxxxxxxx"
set serverftp "192.168.27.55"
set onefile "leon"
set trigger "."

bind pub - ${trigger}ftp pub:ftp

proc pub:ftp {nick host hand chan arg} {
  global serverftp ftpuser ftppass eggpath serverpath onefile
  set ftpclient [exec which ftp]
  set wurstbaum [open "$ftpclient -P 2041 $serverftp" w]
  puts $wurstbaum "user $ftpuser $ftppass"
  puts $wurstbaum "bin"
  puts $wurstbaum "put $eggpath/$onefile $serverftp/$onefile"
  puts $wurstbaum "quit"
  close $wurstbaum
  putserv "PRIVMSG #IRCop :Mission Accomplished"
}


I don't know what to do

It gives this error:

[09:40] <Sierra> [09:40:50] Tcl error [pub:ftp]: couldn't open "/usr/bin/ftp -P 2041 192.168.27.55": permission denied
Back to top
View user's profile Send private message
mrleaW
Voice


Joined: 14 Feb 2018
Posts: 3

PostPosted: Wed Mar 14, 2018 8:17 am    Post subject: Re: FTP help Reply with quote

1.Try to put your server ip not localhost and be sure the location path of ftp is correct.
2. Try doing same privileges to /usr/bin/ftp
chmod 755 /usr/bin/ftp
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2835

PostPosted: Wed Mar 14, 2018 2:45 pm    Post subject: Reply with quote

It would seem you've forgotten the leading pipe (|) when trying to start the ftp-client. Hence, it actually tries to create a new file named "/usr/bin/ftp -P 2041 192.168.27.55", and your process lacks write permissions in /usr/bin...

Try this instead:
Code:
set wurstbaum [open "|$ftpclient -P 2041 $serverftp" w]

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber