feat(storage): allow custom chown value
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/dokku/dokku/plugins/common"
|
"github.com/dokku/dokku/plugins/common"
|
||||||
@@ -99,7 +100,13 @@ func ResolveChownID(chownFlag string) (string, error) {
|
|||||||
case "false":
|
case "false":
|
||||||
return "false", nil
|
return "false", nil
|
||||||
default:
|
default:
|
||||||
return "", errors.New("Unsupported chown permissions")
|
id, err := strconv.ParseUint(chownFlag, 10, 16)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return "", errors.New("Unsupported chown permissions")
|
||||||
|
} else {
|
||||||
|
chownID = fmt.Sprint(id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
userns, err := isUserNamespacesEnabled()
|
userns, err := isUserNamespacesEnabled()
|
||||||
|
|||||||
Reference in New Issue
Block a user