title: How to solve "Operation not permitted: '/var/lib/pgadmin'" error in laradock at Windows Subsystem for Linux?
body: <p>I am using the Laradock in my Laravel project for dockerizing with Nginx, Postgres, and Pgadmin. All the containers are running well but the Pgadmin is unable to do so. Here is my error log, </p>
  
  <pre><code>pgadmin_1              | WARNING: Failed to set ACL on the directory containing the configuration database: [Errno 1] Operation not permitted: '/var/lib/pgadmin'
  pgadmin_1              | Traceback (most recent call last):
  pgadmin_1              |   File "run_pgadmin.py", line 4, in &lt;module&gt;
  pgadmin_1              |     from pgAdmin4 import app
  pgadmin_1              |   File "/pgadmin4/pgAdmin4.py", line 92, in &lt;module&gt;
  pgadmin_1              |     app = create_app()
  pgadmin_1              |   File "/pgadmin4/pgadmin/__init__.py", line 241, in create_app
  pgadmin_1              |     create_app_data_directory(config)
  pgadmin_1              |   File "/pgadmin4/pgadmin/setup/data_directory.py", line 40, in create_app_data_directory
  pgadmin_1              |     _create_directory_if_not_exists(config.SESSION_DB_PATH)
  pgadmin_1              |   File "/pgadmin4/pgadmin/setup/data_directory.py", line 16, in _create_directory_if_not_exists
  pgadmin_1              |     os.mkdir(_path)
  pgadmin_1              | PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin/sessions'
  pgadmin_1              | sudo: setrlimit(RLIMIT_CORE): Operation not permitted
  pgadmin_1              | [2020-06-07 11:48:43 +0000] [1] [INFO] Starting gunicorn 19.9.0
  pgadmin_1              | [2020-06-07 11:48:43 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
  pgadmin_1              | [2020-06-07 11:48:43 +0000] [1] [INFO] Using worker: threads
  pgadmin_1              | /usr/local/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  pgadmin_1              |   return io.open(fd, *args, **kwargs)
  pgadmin_1              | [2020-06-07 11:48:43 +0000] [83] [INFO] Booting worker with pid: 83
  pgadmin_1              | [2020-06-07 11:48:44 +0000] [83] [ERROR] Exception in worker process
  pgadmin_1              | Traceback (most recent call last):
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
  pgadmin_1              |     worker.init_process()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 104, in init_process
  pgadmin_1              |     super(ThreadWorker, self).init_process()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process
  pgadmin_1              |     self.load_wsgi()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
  pgadmin_1              |     self.wsgi = self.app.wsgi()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
  pgadmin_1              |     self.callable = self.load()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
  pgadmin_1              |     return self.load_wsgiapp()
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
  pgadmin_1              |     return util.import_app(self.app_uri)
  pgadmin_1              |   File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app
  pgadmin_1              |     __import__(module)
  pgadmin_1              |   File "/pgadmin4/run_pgadmin.py", line 4, in &lt;module&gt;
  pgadmin_1              |     from pgAdmin4 import app
  pgadmin_1              |   File "/pgadmin4/pgAdmin4.py", line 92, in &lt;module&gt;
  pgadmin_1              |     app = create_app()
  pgadmin_1              |   File "/pgadmin4/pgadmin/__init__.py", line 241, in create_app
  pgadmin_1              |     create_app_data_directory(config)
  pgadmin_1              |   File "/pgadmin4/pgadmin/setup/data_directory.py", line 40, in create_app_data_directory
  pgadmin_1              |     _create_directory_if_not_exists(config.SESSION_DB_PATH)
  pgadmin_1              |   File "/pgadmin4/pgadmin/setup/data_directory.py", line 16, in _create_directory_if_not_exists
  pgadmin_1              |     os.mkdir(_path)
  pgadmin_1              | PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin/sessions'
  pgadmin_1              | [2020-06-07 11:48:44 +0000] [83] [INFO] Worker exiting (pid: 83)
  pgadmin_1              | WARNING: Failed to set ACL on the directory containing the configuration database: [Errno 1] Operation not permitted: '/var/lib/pgadmin'
  pgadmin_1              | /usr/local/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  pgadmin_1              |   return io.open(fd, *args, **kwargs)
  pgadmin_1              | [2020-06-07 11:48:44 +0000] [1] [INFO] Shutting down: Master
  pgadmin_1              | [2020-06-07 11:48:44 +0000] [1] [INFO] Reason: Worker failed to boot.
  </code></pre>
  
  <p>I have tried many ways to solve this problem. Such as, </p>
  
  <p><a href="https://stackoverflow.com/questions/46707935/oserror-errno-13-permission-denied-var-lib-pgadmin">OSError: [Errno 13] Permission denied: &#39;/var/lib/pgadmin&#39;</a></p>
  
  <p><a href="https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html" rel="noreferrer">https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html</a></p>
  
  <p>and some other github issues and their solutions. I also run the <code>sudo chmod -R 777 ~/.laradock/data/pgadmin</code> and <code>sudo chmod -R 777 /var/lib/pgadmin</code> command to get the permission but still the same error log. Can you guys help me on this? I think some others are also getting this error on their local machine. 
  Thanks </p>