Dev Engineering
Completed :latest

docker deployment

Hi,

I always get the error below from the backend container:

[2025-09-24 11:33:49] Agents directory is empty, copying from backup...
cp: can't create '/app/agents/patchmon-agent.sh': Permission denied

Ubuntu 24.04.03

7 Comments

Sign in to comment

Feinstone·8 months ago

I restarted Proxmox and now I'm getting this error in Patchmon too. I didn't change anything, it just appeared.

I then imported a backup, but nothing changed.

Then I deleted the entire VM and recreated it.

I checked that all permissions are set correctly in Docker.

backend-1  | [2026-01-30 10:13:36] PatchMon Backend Container Starting...
backend-1  | [2026-01-30 10:13:36] Environment: production
backend-1  | [2026-01-30 10:13:36] Agent version check:
backend-1  | [2026-01-30 10:13:36]   Image script version: 1.2.9
backend-1  | [2026-01-30 10:13:36]   Volume script version: 0.0.0
backend-1  | [2026-01-30 10:13:36]   Image binary version: 1.3.7
backend-1  | [2026-01-30 10:13:36]   Volume binary version: 0.0.0
backend-1  | [2026-01-30 10:13:36] Agents directory is empty - performing initial copy
backend-1  | [2026-01-30 10:13:36] Updating agents to version 1.3.7...
backend-1  | cp: can't create '/app/agents/direct_host_auto_enroll.sh': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-agent-linux-386': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-agent-linux-amd64': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-agent-linux-arm': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-agent-linux-arm64': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-agent.sh': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon-docker-agent.sh': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon_install.sh': Permission denied
backend-1  | cp: can't create '/app/agents/patchmon_remove.sh': Permission denied

I only added passwords and absolute paths to the Compose File.


Addendum

I have now added a new folder for both the front end and back end. The path goes to the /opt folder. I then set the write permission to 777.

Posting anonymously

DennisFaucher·9 months ago

This issue still exists with the dev install instructions

backend-1 | [2025-12-20 11:42:45] PatchMon Backend Container Starting...
backend-1 | [2025-12-20 11:42:45] Environment: development
backend-1 | [2025-12-20 11:42:45] Agent version check:
backend-1 | [2025-12-20 11:42:45] Image script version: 1.2.9
backend-1 | [2025-12-20 11:42:45] Volume script version: 0.0.0
backend-1 | [2025-12-20 11:42:45] Image binary version: 1.3.7
backend-1 | [2025-12-20 11:42:45] Volume binary version: 0.0.0
backend-1 | [2025-12-20 11:42:45] Agents directory is empty - performing initial copy
backend-1 | [2025-12-20 11:42:45] Updating agents to version 1.3.7...
backend-1 | cp: can't create '/app/agents/direct_host_auto_enroll.sh': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-agent-linux-386': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-agent-linux-amd64': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-agent-linux-arm': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-agent-linux-arm64': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-agent.sh': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon-docker-agent.sh': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon_install.sh': Permission denied
backend-1 | cp: can't create '/app/agents/patchmon_remove.sh': Permission denied
backend-1 | cp: can't create '/app/agents/proxmox_auto_enroll.sh': Permission denied
Container patchmon-dev-backend-1 Error dependency backend failed to start
dependency failed to start: container patchmon-dev-backend-1 is unhealthy

Posting anonymously

Famku·about 1 year ago

I read it, thanks

Posting anonymously

9technologygroup·about 1 year ago

Hi,

I believe this is now sorted with the proper documentation and information around docker install:

https://github.com/9technologygroup/patchmon.net/tree/main/docker

Can you let me know if this has resolved your earlier error you were facing with Docker.

Posting anonymously

Famku·about 1 year ago

it works when I set the agent folder to 777

Posting anonymously

Famku·about 1 year ago

unfortunately the error still exist, even if I set the full path

Posting anonymously

ouitec·about 1 year ago

Hello,
The directory agents is located in the parent directory, not inside the current docker directory.
Therefore, please replace this line in your Docker configuration:

./agents:/app/agents

with

../agents:/app/agents

Best regards,

Posting anonymously