# EXCEPTION: Permission denied - Backup

**URL:** https://meta.discourse.org/t/exception-permission-denied-backup/202250
**Category:** Support
**Created:** [August 31, 2021, 4:19pm UTC](https://meta.discourse.org/t/exception-permission-denied-backup/202250 "2021-08-31T16:19:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Eran\_Markus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eran_markus/32/232764_2.png) [@Eran\_Markus](https://meta.discourse.org/u/Eran_Markus)
#### Post date: [August 31, 2021, 4:19pm UTC](https://meta.discourse.org/t/exception-permission-denied-backup/202250/1 "2021-08-31T16:19:08Z")

</div>

Hi,

After clicking the Backup button, this happens.  
Users are logged in using SSO. Former admin manages to create backups (Which at the moment only work automatically)  
My user which is in the admins group is denied, so is another one’s admin user.

Would appreciate the help!

```plaintext
[2021-08-31 16:07:17] Marking backup as running...
[2021-08-31 16:07:17] Making sure '/var/www/discourse/tmp/backups/default/2021-08-31-160717' exists...
[2021-08-31 16:07:17] Making sure '/var/www/discourse/public/backups/default' exists...
[2021-08-31 16:07:17] Updating metadata...
[2021-08-31 16:07:17] Dumping the public schema of the database...
[2021-08-31 16:07:17] EXCEPTION: Permission denied
[2021-08-31 16:07:17] /var/www/discourse/lib/backup_restore/backuper.rb:139:in `popen'
/var/www/discourse/lib/backup_restore/backuper.rb:139:in `dump_public_schema'
/var/www/discourse/lib/backup_restore/backuper.rb:36:in `run'
/var/www/discourse/script/spawn_backup_restore.rb:9:in `backup'
/var/www/discourse/script/spawn_backup_restore.rb:34:in `block in <main>'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `fork'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `<main>'
[2021-08-31 16:07:17] Deleting old backups...
[2021-08-31 16:07:18] Cleaning stuff up...
[2021-08-31 16:07:18] Removing '.tar' leftovers...
[2021-08-31 16:07:18] Marking backup as finished...
[2021-08-31 16:07:18] Refreshing disk stats...
[2021-08-31 16:07:18] Notifying 'eranm' of the end of the backup...
[2021-08-31 16:07:22] Finished!

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 31, 2021, 4:49pm UTC](https://meta.discourse.org/t/exception-permission-denied-backup/202250/2 "2021-08-31T16:49:30Z")

</div>

> [@Eran\_Markus](#):
>
> ```plaintext
> EXCEPTION: Permission denied
> var/www/discourse/lib/backup_restore/backuper.rb:139:in `popen'
> 
> ```

Looks like it’s a problem with the permissions on the folder where the backup will be stored on the server. Enter the container and check if the write permissions are there.

---

<div class="post-metadata">

### Author: ![Eran\_Markus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eran_markus/32/232764_2.png) [@Eran\_Markus](https://meta.discourse.org/u/Eran_Markus)
#### Post date: [September 9, 2021, 2:48pm UTC](https://meta.discourse.org/t/exception-permission-denied-backup/202250/4 "2021-09-09T14:48:32Z")

</div>

No container, it runs on EC2 machine. Data is set to be uploaded to S3 bucket, permissions confirmed.
