# urbestack-home-repair

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-home-repair (--name USER | --all) [--modes] [--dry-run]
```

## Description

Restores ownership and permissions on existing UrbeStack home paths. Use --name to select one customer or reseller, or --all to repair every customer and reseller home. Administrators have no home to repair. Ownership changes require root.

Sets /home/USER to 0755 and root:root, and /home/USER/files to 0750 with the account as owner and the web server's group. Sets web/, each site directory and each document root to 0755. Sets tmp/, mail/, non-hidden directories directly under mail/ and .ssh/ to 0700, and .ssh/authorized_keys to 0600. Restores the account as owner and its primary group on entries below /home/USER/files. The recursive repair changes ownership on symbolic links themselves, skips their targets, and skips device nodes and sockets. When checking the standard paths and document roots, the command follows up to 32 root-owned symbolic links in parent components, such as a relocated /home, and reports links in place of an expected file or directory.

With --modes, also sets directories to 0755 and files to 0644 in web/ and in document roots within the home, clearing setuid and setgid bits. Outside those web trees, mode repairs are limited to the paths listed above.

Reports the old and new values for each change. Use --dry-run to preview those changes. The command skips users whose Linux account or /home/USER directory is missing. Use urbestack-rebuild to create missing paths.

## Same in the API

- [POST /users/{name}/home-repair](https://urbestack.com/docs/api/post-users-name-home-repair.md): Repair ownership and permissions in a customer's home
