Slackbot
07/07/2026, 5:47 PMRocky
07/07/2026, 5:47 PMCREATE STORAGE VOLUME privilege at the SYSTEM level to the user elastic_consumer. In StarRocks, storage volume management is a global system privilege.
1. SQL Fix
Run the following command as a user with administrative privileges (e.g., root or a user with the user_admin role):
sql
GRANT CREATE STORAGE VOLUME ON SYSTEM TO USER 'elastic_consumer'@'%';
(Note: Replace '%' with the actual host if the user is restricted to a specific IP.)
2. Update Policy Configuration
Based on your configuration snippet, you need to add a new statement block to your policy that targets the system resource. Adjust your policy as follows:
hcl
policy "starrocks_core_services_sd_elastic_consumer" {
# ... (existing statements)
# New statement for system-level privileges
statement {
effect = "Allow"
privileges = [
"mysql:CREATE STORAGE VOLUME",
]
resources = [
"mysql:system:${alias("starrocks-core-services-sd")}",
]
}
}
Additional Considerations
1. Usage Privilege: Once the storage volume (e.g., core_services_volume) is created, the user will also need the USAGE privilege on that specific volume to use it for creating databases or tables. You can grant this via SQL:
sql
GRANT USAGE ON STORAGE VOLUME core_services_volume TO USER 'elastic_consumer'@'%';
2. Activation: If you are using roles, ensure the role is active. The error message indicates Current role(s): NONE, which means the user is operating with their base privileges only. If these privileges were granted to a role instead of the user directly, the user must run SET ROLE <role_name> or you must set it as a default role using ALTER USER elastic_consumer DEFAULT ROLE <role_name>.
name>`.
3. Version Requirement: Storage Volumes were introduced in StarRocks v3.1. Ensure your cluster is running v3.1 or higher.
References
• administration/user_privs/authorization/privilege_item.md
• administration/user_privs/authorization/user_privs.md
• sql-reference/sys/sys.mdMinn Fong
07/07/2026, 5:49 PMRocky
07/07/2026, 5:49 PMCREATE EXTERNAL CATALOG is also a SYSTEM-level privilege.
In StarRocks v3.0 and later, creating an external catalog is considered a global operation. To grant this to your user, you would use:
SQL Command
sql
GRANT CREATE EXTERNAL CATALOG ON SYSTEM TO USER 'elastic_consumer'@'%';
Policy Configuration
Add the privilege to the same system resource block in your policy:
hcl
policy "starrocks_core_services_sd_elastic_consumer" {
# ... existing statements
statement {
effect = "Allow"
privileges = [
"mysql:CREATE STORAGE VOLUME",
"mysql:CREATE EXTERNAL CATALOG", # Add this here
]
resources = [
"mysql:system:${alias("starrocks-core-services-sd")}",
]
}
}
Note on Usage
Once a catalog is created, other users (or the same user) will still need the USAGE privilege on that specific catalog to access its metadata and query its tables.
• System level: CREATE EXTERNAL CATALOG (the permission to build a new catalog).
• Catalog level: USAGE (the permission to use/see an existing catalog).
References
• sql-reference/sql-statements/Catalog/CREATE_EXTERNAL_CATALOG.md
• administration/user_privs/authorization/privilege_item.md
• administration/user_privs/authorization/User_privilege.mdMinn Fong
07/07/2026, 6:14 PMRocky
07/07/2026, 6:14 PMAccess denied; you need (at least one of) the ALTER privilege(s) on STORAGE VOLUME core_services_volume, you must grant the ALTER privilege on that specific storage volume to your user.
While some documentation suggests USAGE is enough, the error message explicitly requires ALTER to change the "default" status of the volume.
1. SQL Fix
Run the following command as an administrator:
sql
GRANT ALTER, USAGE ON STORAGE VOLUME core_services_volume TO USER 'elastic_consumer'@'%';
2. Update Policy Configuration
Add a new statement block to your policy targeting the specific storage volume resource. Note that this is a separate resource type from system or database.
hcl
policy "starrocks_core_services_sd_elastic_consumer" {
# ... (previous statements for SYSTEM and DATABASE)
# New statement for the specific storage volume
statement {
effect = "Allow"
privileges = [
"mysql:USAGE",
"mysql:ALTER (STORAGE VOLUME)",
]
resources = [
"mysql:storage_volume:${alias("starrocks-core-services-sd")}/core_services_volume",
]
}
}
Summary of required privileges for this workflow:
1. CREATE STORAGE VOLUME on SYSTEM: To run the CREATE STORAGE VOLUME command.
2. ALTER on STORAGE VOLUME <name>: To run SET ... AS DEFAULT STORAGE VOLUME.
3. USAGE on STORAGE VOLUME <name>: To reference this volume when creating new databases or tables.
References
• sql-reference/sql-statements/cluster-management/storage_volume/SET_DEFAULT_STORAGE_VOLUME.md
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/account-management/GRANT.md
References
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/cluster-management/storage_volume/ALTER_STORAGE_VOLUME.md
• sql-reference/sql-statements/account-management/GRANT.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
• sql-reference/sql-statements/Database/ALTER_DATABASE.md
• sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md
• sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.md
• sql-reference/sql-statements/cluster-management/storage_volume/DROP_STORAGE_VOLUME.mdMinn Fong
07/07/2026, 6:27 PMRocky
07/07/2026, 6:27 PMUSAGE privilege on the mysql:storage_volume resource.
When you create a table and explicitly specify a storage_volume in the PROPERTIES, StarRocks checks if the user has permission to use that specific volume.
Updated Policy Configuration
Add (or update) the following statement in your policy. Ensure it includes both mysql:USAGE (for creating tables) and mysql:ALTER (STORAGE VOLUME) (for the previous error you saw regarding setting the default volume).
hcl
policy "starrocks_core_services_sd_elastic_consumer" {
# ... (other statements)
statement {
effect = "Allow"
privileges = [
"mysql:USAGE",
"mysql:ALTER (STORAGE VOLUME)",
]
resources = [
"mysql:storage_volume:${alias("starrocks-core-services-sd")}/core_services_volume",
]
}
}
SQL equivalent (for immediate testing)
You can run this via a high-privilege account to verify it fixes the issue immediately:
sql
GRANT USAGE, ALTER ON STORAGE VOLUME core_services_volume TO USER 'elastic_consumer'@'%';
Why this is required
* CREATE TABLE: Requires the USAGE privilege on the storage volume specified in the PROPERTIES.
* SET DEFAULT STORAGE VOLUME: Requires the ALTER privilege on the specific storage volume.
* DESC STORAGE VOLUME: Also requires the USAGE privilege on that volume.
References
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
• sql-reference/sql-statements/account-management/GRANT.md
References
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/account-management/GRANT.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
• sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.mdMinn Fong
07/07/2026, 6:28 PMRocky
07/07/2026, 6:29 PMUSAGE privilege on the storage volume.
The USAGE privilege on a STORAGE VOLUME is a management and DDL-level permission. It is required for the following specific actions:
* Describing the volume (DESC STORAGE VOLUME).
* Creating a table or database that explicitly references that volume in its properties.
* Setting a volume as the cluster's default volume.
Why you don't need it for SELECT
When a user runs a SELECT query, StarRocks checks for:
1. USAGE on the Catalog.
2. USAGE on the Database.
3. SELECT on the Table.
The interaction with the underlying remote storage (S3, etc.) is handled by the StarRocks engine using the credentials defined inside the storage volume object. The end-user does not need direct "usage" permission on the volume object just to read data from a table that is already built on top of it.
Summary of Storage Volume Privileges
Operation | Privilege Required
SELECT * FROM table | None (only Table/DB/Catalog privileges)
CREATE TABLE ... PROPERTIES("storage_volume" = "...") | USAGE on the Storage Volume
DESC STORAGE VOLUME <name> | USAGE on the Storage Volume
SET <name> AS DEFAULT STORAGE VOLUME | ALTER on the Storage Volume
CREATE STORAGE VOLUME | CREATE STORAGE VOLUME on SYSTEM
References
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
References
• administration/user_privs/authorization/privilege_item.md
• sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
• administration/user_privs/authorization/User_privilege.md
• administration/user_privs/authorization/privilege_faq.md
• sql-reference/sql-statements/account-management/GRANT.md