Receiving "Cannot open: Permission denied" error
- Dominant language
- Shell
- Stars
- 538
- Forks
- 69
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 2
Description
I'm receiving a "Cannot open: Permission denied" error when trying to run a tar backup.

Here are the contents of my docker-compose file. Do I have something wrong?
```YAML
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: FABRIC
VERSION: 1.20.1
INIT_MEMORY: 1024M
MAX_MEMORY: 5120M
MOTD: A Drewbuntu Server
DIFFICULTY: Normal
SERVER_NAME: Tuxcraft Fabric
PLAYER_IDLE_TIMEOUT: 0
PLUGINS: |
https://cdn.modrinth.com/data/L695BdOy/versions/EjNpDfo3/SetSpawn-3.1.jar
ICON: https://icons.iconarchive.com/icons/papirus-team/papirus-apps/72/tux-icon.png
depends_on:
restore-backup:
condition: service_completed_successfully
volumes:
- ./minecraft-data:/data
- ./mods.txt:/extras/mods.txt:ro
restore-backup:
# Same image as mc, but any base image with bash and tar will work
image: itzg/mc-backup
user: "1000"
restart: no
entrypoint: restore-tar-backup
volumes:
# Must be same mount as mc service, needs to be writable
- ./minecraft-data:/data
# Must be same mount as backups service, but can be read-only
- ./minecraft-backups:/backups:ro
backups:
image: itzg/mc-backup
user: "1000"
depends_on:
mc:
condition: service_healthy
environment:
BACKUP_INTERVAL: "4h"
RCON_HOST: mc
# since this service waits for mc to be healthy, no initial delay is needed
INITIAL_DELAY: 0
# As an example, to backup only the world data:
# INCLUDES: world,world_nether,world_the_end
PRUNE_BACKUPS_DAYS: 7
volumes:
- ./minecraft-data:/data:ro
- ./minecraft-backups:/backups
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the shown docker-compose configuration, especially the restore-backup service, its restore-tar-backup entrypoint, and the /data and /backups mounts. Reproduce the backup or restore flow with these services and investigate the permission failure; done means it runs without the "Cannot open: Permission denied" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100