title: How to manage permissions for S3 mounting in Databricks
body: <p>In Databricks, reading from S3 is typically done by first mounting the S3 bucket to the DBFS with:</p>
  
  <pre><code>// Replace with your values
  //
  // NOTE: Set the access to this notebook appropriately to protect the security of your keys.
  // Or you can delete this cell after you run the mount command below once successfully.
  
  val AccessKey = "REPLACE_WITH_YOUR_ACCESS_KEY"
  val SecretKey = "REPLACE_WITH_YOUR_SECRET_KEY"
  val EncodedSecretKey = SecretKey.replace("/", "%2F")
  val AwsBucketName = "REPLACE_WITH_YOUR_S3_BUCKET"
  val MountName = "REPLACE_WITH_YOUR_MOUNT_NAME"
  
  dbutils.fs.mount(s"s3a://$AccessKey:$EncodedSecretKey@$AwsBucketName", s"/mnt/$MountName")
  </code></pre>
  
  <p>Once you mount an S3 bucket, it is available for <strong>all users</strong>. This may cause serious issues where users change or delete data they are not familiar with.</p>
  
  <p>I'd like to mount a few buckets in read-only mode, and not let anyone mound buckets without specific permissions.</p>
  
  <p>How can you manage the permissions for users to mount S3 buckets into Databricks?</p>