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'])
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'])
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'])