示例#1
0
    def __init__(self, uid, gid, cwd, env):
        (state_file, state_file_name) = tempfile.mkstemp(dir=cwd,
                                                         prefix='cloudr',
                                                         suffix="_state",
                                                         text=True)
        chmod(state_file_name, 'IR', 'IW', 'IE')
        chown(state_file_name, uid, gid)

        self.env = env
        self.state_file_name = state_file_name
        os.close(state_file)
        self.env[ENV_FILE_NAME] = state_file_name.replace('\\', '\\\\')
示例#2
0
    def __init__(self, uid, gid, cwd, env):
        (state_file, state_file_name) = tempfile.mkstemp(dir=cwd,
                                                         prefix='cloudr',
                                                         suffix="_state",
                                                         text=True)
        chmod(state_file_name, 'IR', 'IW', 'IE')
        chown(state_file_name, uid, gid)

        self.env = env
        self.state_file_name = state_file_name
        os.close(state_file)
        self.env[ENV_FILE_NAME] = state_file_name.replace('\\', '\\\\')
示例#3
0
    def __init__(self, uid, gid, cwd, env):
        (state_file, state_file_name) = tempfile.mkstemp(dir=cwd,
                                                         prefix='cloudr',
                                                         suffix="_state",
                                                         text=True)
        try:
            chmod(state_file_name, uid, 'IR', 'IW', 'IE', 'GR', 'GW')
        except:
            LOG.warn("Cannot set permissions for PowerShell script")

        self.env = env
        self.state_file_name = state_file_name
        os.close(state_file)
        self.env[ENV_FILE_NAME] = state_file_name
示例#4
0
    def __init__(self, uid, gid, cwd, env):
        (state_file, state_file_name) = tempfile.mkstemp(dir=cwd,
                                                         prefix='cloudr',
                                                         suffix="_state",
                                                         text=True)
        try:
            chmod(state_file_name, uid, 'IR', 'IW', 'IE', 'GR', 'GW')
        except:
            LOG.warn("Cannot set permissions for PowerShell script")

        self.env = env
        self.state_file_name = state_file_name
        os.close(state_file)
        self.env[ENV_FILE_NAME] = state_file_name
示例#5
0
 def chmod(self, path, *modes):
     chmod(path, self.get_uid(), *modes)
示例#6
0
 def chmod(self, path, *modes):
     chmod(path, self.get_uid(), *modes)