mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
first version
This commit is contained in:
15
utils/umask_unix.go
Normal file
15
utils/umask_unix.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// +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)
|
||||
}
|
||||
Reference in New Issue
Block a user