title: mkdir: cannot create directory ‘X’: Permission denied
body: <p>I'm very confused by why I do not have permissions in a certain folder. I installed an app called Grafana which created a user and a group called &quot;grafana&quot; and created some files in <code>/var/lib/grafana/</code> with ownership to &quot;grafana&quot;.</p>
  <pre><code>operator@pop-os:/var/lib/grafana$ ls -la
  total 780
  drwxr-xr-x  5 grafana grafana   4096 Mar 10 14:21 .
  drwxr-xr-x 76 root    root      4096 Mar  7 12:09 ..
  drwxr-x---  3 grafana grafana   4096 Mar  7 12:09 alerting
  drwx------  2 grafana grafana   4096 Mar  7 12:09 csv
  -rw-r-----  1 grafana grafana 774144 Mar 10 04:21 grafana.db
  drwx------  2 grafana grafana   4096 Mar  7 12:09 png
  </code></pre>
  <p>I'm trying to create a new folder called &quot;plugins&quot; and copy some files in to it but I keep getting &quot;Permission denied&quot;.</p>
  <p>I have tried adding my user account to the group &quot;grafana&quot; with <code>sudo usermod -aG grafana operator</code> and I even tried adding my account to root group <code>sudo usermod -aG root operator</code> and I still don't have permission. I've tried logging out of account and back in to refresh permissions and it doesn't help.</p>
  <p>I can use <code>sudo mkdir plugins</code> but that will create a folder with &quot;root&quot; as the owner, which I don't want because I think Grafana will not be able to access this folder.</p>
  <p>What is actually the proper way to create a new folder that belongs to user/group &quot;grafana&quot; but I can still access it with user &quot;operator&quot; if I want to change some content in it?</p>