[adherents.py] On rajoute le bon gid de www-data

This commit is contained in:
Raphaël-David Lasseri 2014-09-16 20:23:18 +02:00
parent 5945308d8e
commit eea04ce6dd

View file

@ -4,7 +4,7 @@
# Copyright (C) Frédéric Pauget # Copyright (C) Frédéric Pauget
# Licence : GPLv2 # Licence : GPLv2
import smtplib, sys, commands, shutil, os, traceback import smtplib, sys, commands, shutil, os, traceback,grp
sys.path.append('/usr/scripts/gestion') sys.path.append('/usr/scripts/gestion')
from affich_tools import cprint, anim, OK, WARNING, ERREUR from affich_tools import cprint, anim, OK, WARNING, ERREUR
import config import config
@ -168,8 +168,8 @@ class home:
### Owncloud dans le home ### Owncloud dans le home
if not os.path.exists(home + '/OwnCloud'): if not os.path.exists(home + '/OwnCloud'):
os.mkdir(home + '/OwnCloud') os.mkdir(home + '/OwnCloud')
os.chown(home + '/OwnCloud', int(uid), "www-data") os.chown(home + '/OwnCloud', int(uid), grp.getgrnam('www-data').gr_gid)
os.chmod(home + '/OwnCloud',770) os.chmod(home + '/OwnCloud',0770)
except: except:
print ERREUR print ERREUR
if self.debug: if self.debug: