github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/storage/util/file_permissions.go (about)

     1  //nolint:stylecheck // prefer caps for these
     2  package util
     3  
     4  const (
     5  	OS_USER_R   = 0400
     6  	OS_USER_W   = 0200
     7  	OS_USER_X   = 0100
     8  	OS_USER_RW  = OS_USER_R | OS_USER_W
     9  	OS_USER_RWX = OS_USER_R | OS_USER_W | OS_USER_X
    10  
    11  	OS_GROUP_R   = 0040
    12  	OS_GROUP_W   = 0020
    13  	OS_GROUP_X   = 0010
    14  	OS_GROUP_RW  = OS_GROUP_R | OS_GROUP_W
    15  	OS_GROUP_RWX = OS_GROUP_R | OS_GROUP_W | OS_GROUP_X
    16  
    17  	OS_OTH_R   = 0004
    18  	OS_OTH_W   = 0002
    19  	OS_OTH_X   = 0001
    20  	OS_OTH_RW  = OS_OTH_R | OS_OTH_W
    21  	OS_OTH_RWX = OS_OTH_R | OS_OTH_W | OS_OTH_X
    22  
    23  	OS_ALL_R   = OS_USER_R | OS_GROUP_R | OS_OTH_R
    24  	OS_ALL_W   = OS_USER_W | OS_GROUP_W | OS_OTH_W
    25  	OS_ALL_X   = OS_USER_X | OS_GROUP_X | OS_OTH_X
    26  	OS_ALL_RW  = OS_USER_RW | OS_GROUP_RW | OS_OTH_RW
    27  	OS_ALL_RWX = OS_USER_RWX | OS_GROUP_RWX | OS_OTH_RWX
    28  )