07-20-2023 04:41 AM
Hi,
I want to prevent user from executing harmful commands like dbutils.fs.rm at cluster level/workspace level.
Can we do this in databricks? Are there any classes/APIs that we can override?
07-21-2023 04:14 AM
07-21-2023 05:10 AM
Both additionally scala also. Basically I want to override inbuilt functions like dbutils.fs.rm. For shell commands, I can disable harmful commands by simply removing execute permission. For scala, I found the jar which has implementation of dbutils.fs.rm but I am not sure how I can override this function
07-21-2023 06:09 AM
Currently we do not have a way to disable harmful dbutils commands.
But you can try setting access controls to restrict users from performing any harmful operation: https://docs.databricks.com/security/auth-authz/access-control/index.html
07-21-2023 04:32 AM
Currently we do not have a way to disable harmful dbutils commands.
07-22-2023 09:52 PM
We haven't heard from you since the last response from @Vinay_M_R , and I was checking back to see if her suggestions helped you.
Or else, If you have any solution, please share it with the community, as it can be helpful to others.
Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.
02-26-2024 03:01 AM
Can We Embed this in topmost INIT file?
alias rm='echo "rm is disabled, please check with the admin."'
02-28-2024 01:06 AM - edited 02-28-2024 01:07 AM
Hi ,
I got the similar kind of problem too.
I followed this
put chmod -x /bin/rm in init.sh in workspace and add it at cluster your cluster level init script or global init script.
this restricts the users to use rm command.
Regards,
Nikhil Srivastava
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group