1
0
mirror of https://github.com/coalaura/up.git synced 2025-07-17 21:44:35 +00:00

update perms

This commit is contained in:
Laura
2025-06-20 18:14:15 +02:00
parent 1f1fb4c6e3
commit d8cf89619f
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ func (cs *CertificateStore) Pin(name, fingerprint string) error {
Fingerprint: fingerprint, Fingerprint: fingerprint,
} }
file, err := os.OpenFile(cs.path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) file, err := os.OpenFile(cs.path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
if err != nil { if err != nil {
return err return err
} }

View File

@ -232,10 +232,10 @@ func HandleReceiveRequest(w http.ResponseWriter, r *http.Request) {
name := filepath.Base(part.FileName()) name := filepath.Base(part.FileName())
if _, err := os.Stat("files"); os.IsNotExist(err) { if _, err := os.Stat("files"); os.IsNotExist(err) {
os.Mkdir("files", 0755) os.Mkdir("files", 0700)
} }
target, err := os.OpenFile(filepath.Join("files", name), os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644) target, err := os.OpenFile(filepath.Join("files", name), os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
if err != nil { if err != nil {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)