mirror of
https://github.com/coalaura/up.git
synced 2025-07-17 21:44:35 +00:00
update perms
This commit is contained in:
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user