# Backup failure when temp backup file is moved to backups/default directory

**URL:** <https://meta.discourse.org/t/backup-failure-when-temp-backup-file-is-moved-to-backups-default-directory/293183>\
**Category:** Self-hosting\
**Tags:** backups\
**Created:** [January 28, 2024, 6:40am UTC](https://meta.discourse.org/t/backup-failure-when-temp-backup-file-is-moved-to-backups-default-directory/293183 "2024-01-28T06:40:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)\
**Post date:** [January 28, 2024, 10:28am UTC](https://meta.discourse.org/t/backup-failure-when-temp-backup-file-is-moved-to-backups-default-directory/293183/2 "2024-01-28T10:28:11Z")

</div>

Those two locations are (normally) on the same disk, so it can’t be disk space trouble, so indeed I think it must be permission trouble. Of course backups will normally work - assuming you did a [standard install](https://meta.discourse.org/t/142537?silent=true) - and so it seems likely that your manual creation of a directory has something to do with the trouble.

But. I checked on my machine, and the ownership and protection is like this, inside the container:

```plaintext
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -ltrd /var/www/discourse/tmp/backups/default /var/www/discourse/public/backups/default
drwxr-xr-x 2 discourse www-data 4096 Jan 24 03:36 /var/www/discourse/tmp/backups/default
drwxr-xr-x 2 discourse www-data 4096 Jan 24 03:36 /var/www/discourse/public/backups/default
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /var/www/discourse/tmp/backups/default /var/www/discourse/public/backups/default
drwxr-xr-x 2 1000 33 4096 Jan 24 03:36 /var/www/discourse/tmp/backups/default
drwxr-xr-x 2 1000 33 4096 Jan 24 03:36 /var/www/discourse/public/backups/default
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /var/www/discourse/tmp/backups /var/www/discourse/public/backups
lrwxrwxrwx 1 0 0 19 Jan 10 15:26 /var/www/discourse/tmp/backups -> /shared/tmp/backups
lrwxrwxrwx 1 0 0 15 Jan 10 15:26 /var/www/discourse/public/backups -> /shared/backups
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /var/www/discourse/tmp /var/www/discourse/public
drwxr-xr-x 1 1000 1000 12288 Jan 10 15:31 /var/www/discourse/public
drwxr-xr-x 1 1000 33 4096 Jan 10 15:36 /var/www/discourse/tmp
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /var/www/discourse
drwxr-xr-x 1 1000 1000 4096 Jan 10 15:26 /var/www/discourse
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /shared/backups /shared/tmp/backups
drwxr-xr-x 3 1000 33 4096 Aug 15 2019 /shared/backups
drwxr-xr-x 3 1000 33 4096 Jan 10 15:36 /shared/tmp/backups
root@ubuntu-2gb-nbg1-1-app:/var/www/discourse# ls -nltrd /shared /shared/tmp
drwxr-xr-x 13 0 0 4096 Jan 27 2021 /shared
drwxr-xr-x 4 1000 33 4096 Jan 10 15:35 /shared/tmp

```

The 1000 user is “discourse” and the 33 group is “www-data” and all of this doesn’t give me a clue as to what your problem is. Sorry.

---

_[View the full topic](https://meta.discourse.org/t/backup-failure-when-temp-backup-file-is-moved-to-backups-default-directory/293183)._
