View previous topic :: View next topic |
Author |
Message |
l.kleijn Voice
Joined: 18 May 2014 Posts: 8
|
Posted: Wed Mar 14, 2018 4:55 am Post subject: FTP help |
|
|
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 |
|
 |
mrleaW Voice
Joined: 14 Feb 2018 Posts: 3
|
Posted: Wed Mar 14, 2018 8:17 am Post subject: Re: FTP help |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2831
|
Posted: Wed Mar 14, 2018 2:45 pm Post subject: |
|
|
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 |
|
 |
|