1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-26 01:26:50 +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 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)