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) {
|
2019-09-05 14:21:35 +00:00
|
|
|
logger.Debug(logSender, "", "set umask to %v (%v)", configValue, umask)
|
2019-07-20 10:26:52 +00:00
|
|
|
syscall.Umask(umask)
|
|
|
|
}
|