Exemplo n.º 1
0
def setwebrootpermissions(self, webroot):
    Log.debug(self, "Setting up permissions")
    EEFileUtils.chown(self,
                      webroot,
                      EEVariables.ee_php_user,
                      EEVariables.ee_php_user,
                      recursive=True)
Exemplo n.º 2
0
def setwebrootpermissions(self, webroot):
    Log.debug(self, "Setting up permissions")
    try:
        EEFileUtils.chown(self, webroot, EEVariables.ee_php_user, EEVariables.ee_php_user, recursive=True)
    except Exception as e:
        Log.debug(self, str(e))
        raise SiteError("problem occured while settingup webroot permissions")
Exemplo n.º 3
0
def setwebrootpermissions(self, webroot):
    Log.debug(self, "Setting up permissions")
    try:
        EEFileUtils.chown(self, webroot, EEVariables.ee_php_user,
                          EEVariables.ee_php_user, recursive=True)
    except Exception as e:
        Log.debug(self, str(e))
        raise SiteError("problem occured while settingup webroot permissions")
Exemplo n.º 4
0
 def add(self):
     """Swap addition with EasyEngine"""
     if EEVariables.ee_ram < 512:
         if EEVariables.ee_swap < 1000:
             Log.info(self, "Adding SWAP")
             EEShellExec.cmd_exec(self, "dd if=/dev/zero of=/ee-swapfile " "bs=1024 count=1048k")
             EEShellExec.cmd_exec(self, "mkswap /ee-swapfile")
             EEFileUtils.chown(self, "/ee-swapfile", "root", "root")
             EEFileUtils.chmod(self, "/ee-swapfile", 0o600)
             EEShellExec.cmd_exec(self, "swapon /ee-swapfile")
             with open("/etc/fstab", encoding="utf-8", mode="a") as swap_file:
                 swap_file.write("/ee-swapfile\tnone\tswap\tsw\t0 0")
Exemplo n.º 5
0
 def add(self):
     """Swap addition with EasyEngine"""
     if EEVariables.ee_ram < 512:
         if EEVariables.ee_swap < 1000:
             Log.info(self, "Adding SWAP")
             EEShellExec.cmd_exec(self, "dd if=/dev/zero of=/ee-swapfile "
                                  "bs=1024 count=1048k")
             EEShellExec.cmd_exec(self, "mkswap /ee-swapfile")
             EEFileUtils.chown(self, "/ee-swapfile", "root", "root")
             EEFileUtils.chmod(self, "/ee-swapfile", 0o600)
             EEShellExec.cmd_exec(self, "swapon /ee-swapfile")
             with open("/etc/fstab",
                       encoding='utf-8', mode='a') as swap_file:
                 swap_file.write("/ee-swapfile\tnone\tswap\tsw\t0 0")
Exemplo n.º 6
0
def setwebrootpermissions(self, webroot):
    Log.debug(self, "Setting up permissions")
    EEFileUtils.chown(self, webroot, EEVariables.ee_php_user,
                      EEVariables.ee_php_user, recursive=True)