gastownhall/beads · error

newExternalProxiedServerUOWProvider: mkdir %s: %w

Error message

newExternalProxiedServerUOWProvider: mkdir %s: %w

What it means

newExternalProxiedServerUOWProvider creates the validated server root directory with os.MkdirAll(rootPath, config.BeadsDirPerm) before constructing the provider; if that mkdir fails the error is wrapped with this message including the root path. Typical causes are filesystem-level problems: missing parent directories that cannot be created, permission denied, read-only filesystem, or the path being occupied by a non-directory that validation somehow passed (e.g. raced deletion) or ENOSPC.

Source

Thrown at cmd/bd/uow_factory.go:450

	if err != nil {
		return nil, fmt.Errorf("newExternalProxiedServerUOWProvider: resolve root path: %w", err)
	}
	if err := validateProxiedServerRootPath(rootPath); err != nil {
		return nil, fmt.Errorf("newExternalProxiedServerUOWProvider: proxied server root (from env or %s): %w", configfile.ProxiedServerClientInfoFileName, err)
	}

	logPath, isCustomLog, err := resolveProxiedServerLogPath(beadsDir)
	if err != nil {
		return nil, fmt.Errorf("newExternalProxiedServerUOWProvider: resolve log path: %w", err)
	}
	if isCustomLog {
		if err := validateProxiedServerLogPath(logPath); err != nil {
			return nil, fmt.Errorf("newExternalProxiedServerUOWProvider: proxied server log (from env or %s): %w", configfile.ProxiedServerClientInfoFileName, err)
		}
	}

	if err := os.MkdirAll(rootPath, config.BeadsDirPerm); err != nil {
		return nil, fmt.Errorf("newExternalProxiedServerUOWProvider: mkdir %s: %w", rootPath, err)
	}

	return uow.NewExternalDoltServerUOWProvider(
		ctx,
		rootPath,
		topology.database,
		logPath,
		*topology.external,
		topology.external.ResolvedUser(),
		topology.rootPassword,
		topology.proxyPort,
		topology.proxyIdle,
		topology.teamServer,
		topology.expectedProjectID,
		opts...,
	)
}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Check disk space and writability: df -h on the root path's volume, and confirm the filesystem is not mounted read-only
  2. Create/repair the parent directories manually (mkdir -p) and ensure the running user owns them or has write permission
  3. Point BEADS_PROXIED_SERVER_ROOT_PATH (or the sidecar root_path) at a writable location the bd user can create directories in
  4. Check for MAC/ACL policies (SELinux denials in audit log, ACLs via getfacl) blocking directory creation

Example fix

// before: root in a read-only/privileged location
export BEADS_PROXIED_SERVER_ROOT_PATH=/usr/local/share/beads-dolt
// after: writable, user-owned location
export BEADS_PROXIED_SERVER_ROOT_PATH=$HOME/.local/share/beads/shared-server/dolt
Defensive patterns

Strategy: validation

Validate before calling

if err := os.MkdirAll(rootPath, 0o755); err != nil {
	return fmt.Errorf("precheck: cannot create root %s: %w", rootPath, err)
}

Try / catch

if err := os.MkdirAll(rootPath, config.BeadsDirPerm); err != nil {
	var perr *fs.PathError
	if errors.As(err, &perr) && (errors.Is(perr.Err, syscall.EROFS) || errors.Is(perr.Err, syscall.ENOSPC)) {
		// surface disk/read-only guidance to the operator
	}
	return err
}

Prevention

When it happens

Trigger: Parent of rootPath does not exist and a component of the path is unwritable; the filesystem holding rootPath is read-only or full; a permission/ACL/SELinux policy denies directory creation; rootPath sits on a removed mount point.

Common situations: BEADS_PROXIED_SERVER_ROOT_PATH points into /usr, /etc, or another root-owned tree; container running with a read-only rootfs; disk quota exceeded on the volume hosting ~/.beads or a custom root.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/cd5eb4c5dfb3a6a2. Report an issue: GitHub.