mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +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:
@@ -150,13 +150,16 @@ func TransferLog(operation string, path string, elapsed int64, size int64, user
|
||||
}
|
||||
|
||||
// CommandLog logs an SFTP/SCP command
|
||||
func CommandLog(command string, path string, target string, user string, connectionID string, protocol string) {
|
||||
func CommandLog(command, path, target, user, fileMode, connectionID, protocol string, uid, gid int) {
|
||||
logger.Info().
|
||||
Timestamp().
|
||||
Str("sender", command).
|
||||
Str("username", user).
|
||||
Str("file_path", path).
|
||||
Str("target_path", target).
|
||||
Str("filemode", fileMode).
|
||||
Int("uid", uid).
|
||||
Int("gid", gid).
|
||||
Str("connection_id", connectionID).
|
||||
Str("protocol", protocol).
|
||||
Msg("")
|
||||
|
||||
Reference in New Issue
Block a user