mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
sftpd: add support for chmod/chown
added matching permissions too and a new setting "setstat_mode". Setting setstat_mode to 1 you can keep the previous behaviour that silently ignore setstat requests
This commit is contained in:
@@ -601,14 +601,14 @@ func (c *scpCommand) sendProtocolMessage(message string) error {
|
||||
func (c *scpCommand) sendExitStatus(err error) {
|
||||
status := uint32(0)
|
||||
if err != nil {
|
||||
status = 1
|
||||
status = uint32(1)
|
||||
}
|
||||
ex := exitStatusMsg{
|
||||
exitStatus := sshSubsystemExitStatus{
|
||||
Status: status,
|
||||
}
|
||||
c.connection.Log(logger.LevelDebug, logSenderSCP, "send exit status for command with args: %v user: %v err: %v",
|
||||
c.args, c.connection.User.Username, err)
|
||||
c.connection.channel.SendRequest("exit-status", false, ssh.Marshal(&ex))
|
||||
c.connection.channel.SendRequest("exit-status", false, ssh.Marshal(&exitStatus))
|
||||
c.connection.channel.Close()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user