1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:00:54 +00:00

Merge pull request #3975 from nicowaisman/patch-2

Change permission mask
This commit is contained in:
Ming Deng 2020-06-13 23:40:13 +08:00 committed by GitHub
commit bac2b31afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ func (fp *FileProvider) SessionRead(sid string) (Store, error) {
filepder.lock.Lock() filepder.lock.Lock()
defer filepder.lock.Unlock() defer filepder.lock.Unlock()
err := os.MkdirAll(path.Join(fp.savePath, string(sid[0]), string(sid[1])), 0777) err := os.MkdirAll(path.Join(fp.savePath, string(sid[0]), string(sid[1])), 0755)
if err != nil { if err != nil {
SLogger.Println(err.Error()) SLogger.Println(err.Error())
} }
@ -231,7 +231,7 @@ func (fp *FileProvider) SessionRegenerate(oldsid, sid string) (Store, error) {
return nil, fmt.Errorf("newsid %s exist", newSidFile) return nil, fmt.Errorf("newsid %s exist", newSidFile)
} }
err = os.MkdirAll(newPath, 0777) err = os.MkdirAll(newPath, 0755)
if err != nil { if err != nil {
SLogger.Println(err.Error()) SLogger.Println(err.Error())
} }