Skip to content

fix: do not make /etc/dokploy world-writable in install.sh - #225

Open
Ahmad-b1995 wants to merge 1 commit into
Dokploy:mainfrom
Ahmad-b1995:fix/install-etc-dokploy-not-world-writable
Open

Ahmad-b1995 wants to merge 1 commit into
Dokploy:mainfrom
Ahmad-b1995:fix/install-etc-dokploy-not-world-writable

Conversation

@Ahmad-b1995

Copy link
Copy Markdown

What is this PR about?

install.sh runs chmod 777 /etc/dokploy, and the manual-installation docs tell users to do the same. That directory is bind-mounted into the Dokploy and Traefik containers and holds their configuration (traefik/), generated app files, scheduled-task scripts (schedules/) and .env files.

Write permission on a directory is enough to rename the entries inside it, even root-owned ones. So on any multi-user host, an unprivileged local user can move a root-owned subdirectory aside and put their own in its place. Dokploy and Traefik then read that content as their configuration, and the scheduled-task runner executes schedules/<app>/script.sh as root, which turns the world-writable directory into a local privilege escalation to root.

The installer and the container both run as root, so nothing needs the directory world-writable. This lowers it to 0755, which keeps root as the sole writer while leaving it readable and traversable. This matches what the remote-server path already does, where ownership is handed to the install user with chown rather than widening permissions.

  • apps/website/public/install.sh: chmod 755 instead of chmod 777.
  • apps/docs/content/docs/core/manual-installation.mdx: the same change in both copy-paste blocks.

Issues related (if applicable)

Reported privately to contact@dokploy.com first (2026-09-30), following SECURITY.md. Opening publicly now after no response. Single-user hosts are not affected; shared or multi-user hosts are.

🤖 Generated with Claude Code

install.sh runs as root and the Dokploy container also runs as root, so
nothing needs /etc/dokploy to be world-writable. At 0777 any local user
can rename a root-owned entry such as traefik/ or schedules/ and put their
own directory in its place, which Dokploy and Traefik then read and run as
root. 0755 keeps root as the sole writer while leaving the directory
readable and traversable. Remote installs already take ownership with
`chown` rather than widening permissions.

The same instruction in the manual-installation docs is lowered to 0755.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant