mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 23:20:24 +00:00
a4834f4a83
we have now an interface for filesystem backeds, this make easy to add new filesystem backends
28 lines
393 B
Go
28 lines
393 B
Go
// +build !windows
|
|
|
|
package vfs
|
|
|
|
import "syscall"
|
|
|
|
import "os"
|
|
|
|
var (
|
|
defaultUID, defaultGID int
|
|
)
|
|
|
|
func init() {
|
|
defaultUID = os.Getuid()
|
|
defaultGID = os.Getuid()
|
|
if defaultUID < 0 {
|
|
defaultUID = 65534
|
|
}
|
|
if defaultGID < 0 {
|
|
defaultGID = 65534
|
|
}
|
|
}
|
|
|
|
func (fi S3FileInfo) getFileInfoSys() interface{} {
|
|
return &syscall.Stat_t{
|
|
Uid: uint32(defaultUID),
|
|
Gid: uint32(defaultGID)}
|
|
}
|