You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a little bit desperate. SFTP on Windows works fine. I want to make a hook
In sftp.json I made this change.
"event_manager": {
"enabled_commands": "C://WINDOWS//SYSTEM32//CMD.EXE"
}
With a \ instead of / , \ or // I get an error
I made an action:
Command: "C://WINDOWS//SYSTEM32//CMD.EXE"
Arguments: C://Scripts//TEST.CMD
The rule is fired. I can see it in the log file:
{"level":"debug","time":"2024-12-15T19:53:57.974","sender":"eventmanager","message":"executed command "C://WINDOWS//SYSTEM32//CMD.EXE", elapsed: 104.5642ms, error: "}
{"level":"debug","time":"2024-12-15T19:53:57.974","sender":"eventmanager","message":"executed action "ps" for rule "First upload copy file", elapsed 104.5642ms"}
{
Other combinations with /, \ gives not allowed in the log
The test.cmd is very clean. @echo off
echo %date% >> c:\scripts\test.log
I also change the credentials of sftpgo service in Windows
Still nothing works. with a / or \ . Documentation is unclear.
How must format and call a cmd and powershell script the right way
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm getting a little bit desperate. SFTP on Windows works fine. I want to make a hook
In sftp.json I made this change.
"event_manager": {
"enabled_commands": "C://WINDOWS//SYSTEM32//CMD.EXE"
}
With a \ instead of / , \ or // I get an error
I made an action:
Command: "C://WINDOWS//SYSTEM32//CMD.EXE"
Arguments: C://Scripts//TEST.CMD
The rule is fired. I can see it in the log file:
{"level":"debug","time":"2024-12-15T19:53:57.974","sender":"eventmanager","message":"executed command "C://WINDOWS//SYSTEM32//CMD.EXE", elapsed: 104.5642ms, error: "}
{"level":"debug","time":"2024-12-15T19:53:57.974","sender":"eventmanager","message":"executed action "ps" for rule "First upload copy file", elapsed 104.5642ms"}
{
Other combinations with /, \ gives not allowed in the log
The test.cmd is very clean.
@echo off
echo %date% >> c:\scripts\test.log
I also change the credentials of sftpgo service in Windows
Still nothing works. with a / or \ . Documentation is unclear.
How must format and call a cmd and powershell script the right way
Thanks
Beta Was this translation helpful? Give feedback.
All reactions