mirror of
https://github.com/minio/minio.git
synced 2025-11-25 12:06:10 -05:00
posix: Return errDiskNotWritable during disk initialization. (#2048)
It can happen that minio server might not have writable permissions on the export paths command line. Fixes #2035
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
e5dd917c37
commit
d64c3fd464
9
posix.go
9
posix.go
@@ -218,8 +218,13 @@ func (s *posix) MakeVol(volume string) (err error) {
|
||||
}
|
||||
// Make a volume entry, with mode 0777 mkdir honors system umask.
|
||||
err = os.Mkdir(preparePath(volumeDir), 0777)
|
||||
if err != nil && os.IsExist(err) {
|
||||
return errVolumeExists
|
||||
if err != nil {
|
||||
if os.IsExist(err) {
|
||||
return errVolumeExists
|
||||
} else if os.IsPermission(err) {
|
||||
return errDiskAccessDenied
|
||||
}
|
||||
return err
|
||||
}
|
||||
// Success
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user