def perm_octal2str(perm_octal):
    """Convert octal permission int to permission string
    Args:
        perm_octal (int): octal-based file permissions specifier

    Returns:
        str: rwx--- type file permission string
    """
    perm_str = ""

    # add to perm_str starting with LSB and working to MSB
    while len(perm_str) < 9:
        perm = perm_octal & 0o07
        perm_octal = perm_octal >> 3
        if perm & 1:
            perm_str = "x" + perm_str
        else:
            perm_str = "-" + perm_str
        if perm & 2:
            perm_str = "w" + perm_str
        else:
            perm_str = "-" + perm_str
        if perm & 4:
            perm_str = "r" + perm_str
        else:
            perm_str = "-" + perm_str

    return perm_str