Prevent users from running shell commands
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 08:36 AM
Hi, is there any way to prevent users from running shell commands in Databricks notebooks? for example, "%%bash"
I read that REVOKE EXECUTE ON SHELL command can be used. but i am unable to make it to work. Thanks in advance for any help.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:11 AM
Hi @bvraravind,
You can use this spark setting
"spark_conf.spark.databricks.repl.allowedLanguages": { "type": "fixed", "value": "python,sql"
Over a cluster policy to prevent access to shell commands.
https://docs.databricks.com/en/archive/compute/cluster-ui-preview.html

