sftpgo-mirror/utils/umask_unix.go

16 lines
278 B
Go
Raw Normal View History

2019-07-20 10:26:52 +00:00
// +build !windows
package utils
import (
"syscall"
"github.com/drakkan/sftpgo/logger"
)
2019-07-30 18:51:29 +00:00
// SetUmask sets umask on unix systems
2019-07-20 10:26:52 +00:00
func SetUmask(umask int, configValue string) {
logger.Debug(logSender, "", "set umask to %v (%v)", configValue, umask)
2019-07-20 10:26:52 +00:00
syscall.Umask(umask)
}