sftpgo-mirror/utils/umask_unix.go
2019-07-20 12:26:52 +02:00

15 lines
273 B
Go

// +build !windows
package utils
import (
"syscall"
"github.com/drakkan/sftpgo/logger"
)
// SetUmask set umask on unix systems
func SetUmask(umask int, configValue string) {
logger.Debug(logSender, "set umask to %v (%v)", configValue, umask)
syscall.Umask(umask)
}