prestodb/presto · error

PERMISSION_DENIED

PERMISSION_DENIED

Error message

DROP TABLE is disabled in this catalog

What it means

JdbcMetadata.dropTable() refuses to drop tables when the catalog's allowDropTable flag (drop-table configuration) is false, throwing PrestoException(PERMISSION_DENIED, "DROP TABLE is disabled in this catalog"). This is an intentional catalog-level guard, not a remote database permission failure.

Source

Thrown at presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/JdbcMetadata.java:171

            }
            catch (TableNotFoundException e) {
                // table disappeared during listing operation
            }
        }
        return columns.build();
    }

    @Override
    public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
    {
        return ((JdbcColumnHandle) columnHandle).getColumnMetadata();
    }

    @Override
    public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
    {
        if (!allowDropTable) {
            throw new PrestoException(PERMISSION_DENIED, "DROP TABLE is disabled in this catalog");
        }
        JdbcTableHandle handle = (JdbcTableHandle) tableHandle;
        jdbcClient.dropTable(session, JdbcIdentity.from(session), handle);
        jdbcMetadataCache.invalidateTable(session, handle);
    }

    @Override
    public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)
    {
        JdbcOutputTableHandle handle = jdbcClient.beginCreateTable(session, tableMetadata);
        setRollback(() -> jdbcClient.rollbackCreateTable(session, JdbcIdentity.from(session), handle));
        return handle;
    }

    @Override
    public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
    {
        jdbcClient.createTable(session, tableMetadata);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set allow-drop-table=true in the catalog properties file and restart the coordinator/workers
  2. Run DROP TABLE against a catalog where dropping is permitted
  3. Have an admin drop the table if you cannot change catalog configuration

Example fix

// before (catalog properties) - dropping disabled
# (no allow-drop-table setting)
// after
allow-drop-table=true
Defensive patterns

Strategy: try-catch

Validate before calling

// Check the catalog allows drops before issuing DDL
boolean dropAllowed = catalogProperties.getProperty("allow-drop-table", "false").equalsIgnoreCase("true");
if (!dropAllowed) {
    throw new UnsupportedOperationException("DROP TABLE is disabled for catalog " + catalogName);
}

Try / catch

try {
    execute("DROP TABLE " + tableName);
} catch (PrestoException e) {
    if (e.getErrorCode() == PERMISSION_DENIED.toErrorCode() && e.getMessage().contains("DROP TABLE is disabled")) {
        // route the drop through a catalog/admin path where allow-drop-table=true
    } else throw e;
}

Prevention

When it happens

Trigger: Running DROP TABLE on any table in a JDBC catalog whose properties do not enable allowDropTable; thrown immediately before any JDBC client call is made.

Common situations: Default catalog configuration (drop is disabled by default in many deployments); shared analytics clusters where admins intentionally block DDL; users expecting DB-level grants to control this but the connector blocks it earlier.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/aa09494e401f0d50. Report an issue: GitHub.