Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2023-02-07 23:11:54 +0300
committerJames Fargher <jfargher@gitlab.com>2023-02-08 22:41:28 +0300
commit3060313e355e2fe711f6964a44ae5335fb68a76c (patch)
tree652e152c7449eb24a43a82f73bb5921957e0290c
parent2b9a550adc4b7af4bac8332aa1574baf1483f736 (diff)
perm: Add constants for files and executables
This is in preparation for a bulk permission replace.
-rw-r--r--internal/helper/perm/perm.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/helper/perm/perm.go b/internal/helper/perm/perm.go
index 4bb476949..2783f284c 100644
--- a/internal/helper/perm/perm.go
+++ b/internal/helper/perm/perm.go
@@ -22,4 +22,28 @@ const (
// PublicDir is the permission given for a directory that may be read or
// written outside of gitaly.
PublicDir fs.FileMode = 0o777
+
+ // PrivateFile is the permissions given for a file that must only be used
+ // by gitaly.
+ PrivateFile fs.FileMode = 0o600
+
+ // SharedFile is the permission given for a file that may be read outside
+ // of gitaly.
+ SharedFile fs.FileMode = 0o644
+
+ // PublicFile is the permission given for a file that may be read or
+ // written outside of gitaly.
+ PublicFile fs.FileMode = 0o666
+
+ // PrivateExecutable is the permissions given for an executable that must
+ // only be used by gitaly.
+ PrivateExecutable fs.FileMode = 0o700
+
+ // SharedExecutable is the permission given for an executable that may be
+ // executed outside of gitaly.
+ SharedExecutable fs.FileMode = 0o755
+
+ // PublicExecutable is the permission given for an executable that may be
+ // read or written outside of gitaly.
+ PublicExecutable fs.FileMode = 0o777
)