import errno


def is_perm_error(e):
    """Return true if this exception is file permission related.

    :param EnvironmentalError e: Exception to test for permission issues
    :return: True if the exception is permission related, false otherwise
    :rtype: bool
    """
    try:
        return e.errno in (errno.EACCES, errno.EPERM)
    except AttributeError:
        return False