def METHOD_NAME(directory):
    try:
        command = "sudo chmod -R 775 " + directory
        cmd = shlex.split(command)
        res = subprocess.call(cmd)
        if res == 1:
            print("Permissions not changed.")
            return 0
        else:
            print("User permissions setted.")
        command = "sudo chown -R lscpd:cyberpanel " + directory
        cmd = shlex.split(command)
        res = subprocess.call(cmd)
        if res == 1:
            return 0
        else:
            return 1
    except BaseException as msg:
        logging.CyberCPLogFileWriter.writeToFile(
            str(msg) + " [createNewFTPAccount]")
        return 0
    return 1