go-storage
go-storage copied to clipboard
services/fs: Proposal: Support file permission and owner
We could introduce file permission and owner support via add new service pair and metadata.
Proposal
Pair
permission
could be set in open
, but uid
/gid
may need a call to Chown
.
-
permission
:uint32
, The permission of this object (forWrite
related operation) -
uid
:uint32
, The uid of this object -
gid
:uint32
, The gid of this object
Metadata
We could extract following metadata from f.Sys().(*syscall.Stat_t)
(unix only)
-
permission
:uint32
, The permission of this object -
uid
:uint32
, The uid of this object -
gid
:uint32
, The gid of this object
Retional
- How to support permission control on windows? As windows have different concepts compared to Unix alike system.
- we could just ignore the support for windows for now.