diff --git a/build/sysroot/usr/share/casaos/shell/helper.sh b/build/sysroot/usr/share/casaos/shell/helper.sh index 925ece1..c6f576d 100644 --- a/build/sysroot/usr/share/casaos/shell/helper.sh +++ b/build/sysroot/usr/share/casaos/shell/helper.sh @@ -25,7 +25,7 @@ GetNetCard() { fi else if [ -d "/sys/devices/virtual/net" ] && [ -d "/sys/class/net" ]; then - ls /sys/class/net/ | grep -v "$(ls /sys/devices/virtual/net/)" + ls /sys/class/net/ | grep -v "$(ls /sys/devices/virtual/net/)" -w fi fi } diff --git a/main.go b/main.go index b2b80f3..02993ee 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,6 @@ import ( "github.com/IceWhaleTech/CasaOS-Common/utils/constants" "github.com/IceWhaleTech/CasaOS-Common/utils/logger" "github.com/rclone/rclone/cmd/mountlib" - "github.com/rclone/rclone/fs/config/configfile" util_http "github.com/IceWhaleTech/CasaOS-Common/utils/http" @@ -83,7 +82,7 @@ func init() { service.GetCPUThermalZone() service.MyService.Storages().InitStorages() route.InitFunction() - configfile.Install() + //configfile.Install() service.MountLists = make(map[string]*mountlib.MountPoint) } @@ -146,9 +145,9 @@ func main() { "/v1/image", "/v1/samba", "/v1/notify", - "/v1/driver", - "/v1/cloud", - "/v1/recover", + //"/v1/driver", + //"/v1/cloud", + //"/v1/recover", "/v1/other", route.V2APIPath, route.V2DocPath, @@ -167,7 +166,6 @@ func main() { } var events []message_bus.EventType events = append(events, message_bus.EventType{Name: "casaos:system:utilization", SourceID: common.SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}}) - events = append(events, message_bus.EventType{Name: "casaos:file:recover", SourceID: common.SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}}) events = append(events, message_bus.EventType{Name: "casaos:file:operate", SourceID: common.SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}}) // register at message bus for i := 0; i < 10; i++ { diff --git a/route/v1.go b/route/v1.go index 03245f2..e74c648 100644 --- a/route/v1.go +++ b/route/v1.go @@ -36,7 +36,7 @@ func InitV1Router() *gin.Engine { r.GET("/ping", func(ctx *gin.Context) { ctx.String(200, "pong") }) - r.GET("/v1/recover/:type", v1.GetRecoverStorage) + v1Group := r.Group("/v1") v1Group.Use(jwt.ExceptLocalhost()) diff --git a/service/storage.go b/service/storage.go index c07e14a..c1e6b29 100644 --- a/service/storage.go +++ b/service/storage.go @@ -68,9 +68,9 @@ func (s *storageStruct) MountStorage(mountPoint, deviceName string) error { DirCacheTime: 5 * 60 * time.Second, PollInterval: time.Minute, ReadOnly: false, - Umask: 0, - UID: ^uint32(0), // these values instruct WinFSP-FUSE to use the current user - GID: ^uint32(0), // overridden for non windows in mount_unix.go + Umask: 18, + UID: 0, + GID: 0, DirPerms: os.FileMode(0777), FilePerms: os.FileMode(0666), CacheMode: 3,