示例#1
0
文件: app.py 项目: alisheikh/scalr
 def change_permissions(self):
     if self.config['group']:
         helper.chown(self.config['log_file'], os.getuid(), self.config['group'])
         helper.chown(self.config['pid_file'], os.getuid(), self.config['group'])
         helper.set_gid(self.config['group'])
     if self.config['user']:
         helper.chown(self.config['log_file'], self.config['user'], os.getgid())
         helper.chown(self.config['pid_file'], self.config['user'], os.getgid())
         helper.set_uid(self.config['user'])
示例#2
0
def change_permissions():
    if CONFIG['group']:
        helper.chown(CONFIG['log_file'], os.getuid(), CONFIG['group'])
        helper.chown(CONFIG['pid_file'], os.getuid(), CONFIG['group'])
        helper.set_gid(CONFIG['group'])
    if CONFIG['user']:
        helper.chown(CONFIG['log_file'], CONFIG['user'], os.getgid())
        helper.chown(CONFIG['pid_file'], CONFIG['user'], os.getgid())
        helper.set_uid(CONFIG['user'])
示例#3
0
 def change_permissions(self):
     if self.config['group']:
         if self.config['log_file']:
             helper.chown(self.config['log_file'], os.getuid(), self.config['group'])
         helper.chown(self.config['pid_file'], os.getuid(), self.config['group'])
         helper.set_gid(self.config['group'])
     if self.config['user']:
         if self.config['log_file']:
             helper.chown(self.config['log_file'], self.config['user'], os.getgid())
         helper.chown(self.config['pid_file'], self.config['user'], os.getgid())
         helper.set_uid(self.config['user'])