mirror of
https://github.com/evilhero/mylar
synced 2024-12-25 09:11:46 +00:00
FIX:(#1248) Attempt to fix permissions problems when passing a numeric into the User/Group fields within the configuration
This commit is contained in:
parent
c7779872d1
commit
df2a7a4102
1 changed files with 2 additions and 2 deletions
|
@ -1090,13 +1090,13 @@ def setperms(path, dir=False):
|
||||||
from pwd import getpwnam
|
from pwd import getpwnam
|
||||||
chowner = getpwnam(mylar.CHOWNER)[2]
|
chowner = getpwnam(mylar.CHOWNER)[2]
|
||||||
else:
|
else:
|
||||||
chowner = mylar.CHOWNER
|
chowner = int(mylar.CHOWNER)
|
||||||
|
|
||||||
if not mylar.CHGROUP.isdigit():
|
if not mylar.CHGROUP.isdigit():
|
||||||
from grp import getgrnam
|
from grp import getgrnam
|
||||||
chgroup = getgrnam(mylar.CHGROUP)[2]
|
chgroup = getgrnam(mylar.CHGROUP)[2]
|
||||||
else:
|
else:
|
||||||
chgroup = mylar.CHGROUP
|
chgroup = int(mylar.CHGROUP)
|
||||||
|
|
||||||
if dir:
|
if dir:
|
||||||
permission = int(mylar.CHMOD_DIR, 8)
|
permission = int(mylar.CHMOD_DIR, 8)
|
||||||
|
|
Loading…
Reference in a new issue