This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
l.kleijn
Voice
Posts: 33 Joined: Sun May 18, 2014 10:02 am
Post
by l.kleijn » Wed Mar 14, 2018 4:55 am
Code: Select all
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
mrleaW
Voice
Posts: 3 Joined: Wed Feb 14, 2018 8:52 am
Post
by mrleaW » Wed Mar 14, 2018 8:17 am
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
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Mar 14, 2018 2:45 pm
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: Select all
set wurstbaum [open "|$ftpclient -P 2041 $serverftp" w]
NML_375