1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-25 01:01:47 +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:
evilhero 2016-04-15 14:16:45 -04:00
parent c7779872d1
commit df2a7a4102

View file

@ -1090,13 +1090,13 @@ def setperms(path, dir=False):
from pwd import getpwnam
chowner = getpwnam(mylar.CHOWNER)[2]
else:
chowner = mylar.CHOWNER
chowner = int(mylar.CHOWNER)
if not mylar.CHGROUP.isdigit():
from grp import getgrnam
chgroup = getgrnam(mylar.CHGROUP)[2]
else:
chgroup = mylar.CHGROUP
chgroup = int(mylar.CHGROUP)
if dir:
permission = int(mylar.CHMOD_DIR, 8)