gitlab.com/evatix-go/core@v1.3.55/filemode/consts.go (about) 1 package filemode 2 3 import "os" 4 5 // When used 0, golang treats it as octal not decimal anymore. 6 // Reference : https://ss64.com/bash/chmod.html 7 //goland:noinspection ALL 8 const ( 9 AllPermission os.FileMode = 0777 10 AllExecute os.FileMode = 0111 11 AllReadExecute os.FileMode = 0555 12 AllRead os.FileMode = 0444 13 AllWrite os.FileMode = 0222 14 AllWriteExecute os.FileMode = 0333 15 OwnerCanDoAllExecuteGroupOtherCanReadExecute os.FileMode = 0755 16 OwnerCanReadWriteGroupOtherCanReadOnly os.FileMode = 0644 17 OwnerCanDoAllGroupOtherCanReadOnly os.FileMode = 0744 18 OwnerCanDoAllGroupOtherCanReadWriteOnly os.FileMode = 0766 19 OwnerCanDoAllGroupOtherCanExecuteOnly os.FileMode = 0711 20 OwnerCanDoAllGroupOtherCanReadExecuteOnly os.FileMode = 0755 21 OwnerCanDoAllGroupOtherCanWriteOnly os.FileMode = 0722 22 X100 os.FileMode = 0100 23 X200 os.FileMode = 0200 24 X300 os.FileMode = 0300 25 X400 os.FileMode = 0400 26 X500 os.FileMode = 0500 27 X600 os.FileMode = 0600 28 X700 os.FileMode = 0700 29 X111 os.FileMode = 0111 30 X222 os.FileMode = 0222 31 X333 os.FileMode = 0333 32 X444 os.FileMode = 0444 33 X455 os.FileMode = 0455 34 X466 os.FileMode = 0466 35 X555 os.FileMode = 0555 36 X644 os.FileMode = 0644 37 X655 os.FileMode = 0655 38 X666 os.FileMode = 0666 39 X677 os.FileMode = 0677 40 X711 os.FileMode = 0711 41 X722 os.FileMode = 0722 42 X744 os.FileMode = 0744 43 X755 os.FileMode = 0755 44 X766 os.FileMode = 0766 45 X777 os.FileMode = 0777 46 FileDefault os.FileMode = 0644 // cannot execute by everyone OwnerCanReadWriteGroupOtherCanReadOnly 47 DirDefault os.FileMode = 0755 // can execute by everyone OwnerCanDoAllExecuteGroupOtherCanReadExecute 48 OwnerFullAccessOnly os.FileMode = 0700 49 OwnerGroupFullAccessOnly os.FileMode = 0770 50 CacheFullAccess os.FileMode = 0777 51 FullAccess os.FileMode = 0777 52 )