You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Does not check run user when the install lock is off.
907
910
ifInstallLock {
@@ -911,6 +914,15 @@ func NewContext() {
911
914
}
912
915
}
913
916
917
+
// check if we run as root
918
+
ifos.Getuid() ==0 {
919
+
if!unsafeAllowRunAsRoot {
920
+
// Special thanks to VLC which inspired the wording of this messaging.
921
+
log.Fatal("Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission")
922
+
}
923
+
log.Critical("You are running Gitea using the root user, and have purposely chosen to skip built-in protections around this. You have been warned against this.")
0 commit comments