# urbestack-protected-folder-set

First published 4 Nov 2026 (release 0.2.24) · Unchanged since publication

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

## Usage

```
urbestack-protected-folder-set --user CUSTOMER --path /web/example.com/public_html/private --list-files|--no-list-files
```

## Description

Changes whether Apache lists a protected folder's files for signed-in visitors when there is no index page. Specify exactly one of --list-files and --no-list-files. In each site that contains the folder, --list-files applies Options +Indexes to the folder and --no-list-files applies Options -Indexes, so Apache returns Forbidden when there is no index page. Directory listing is enabled by default when you protect a folder. A site that uses the folder as its document root applies its own directory listing setting.

UrbeStack regenerates the sites' virtual host configurations and reloads Apache immediately.

## Same in the API

- [PATCH /protected-folders/{id}](https://urbestack.com/docs/api/patch-protected-folders-id.md): Change the directory listing setting for a protected folder

## Command family: protected

- [urbestack-protected-folder-add](https://urbestack.com/docs/commands/urbestack-protected-folder-add.md): Protects a customer's folder with HTTP Basic authentication.
- [urbestack-protected-folder-del](https://urbestack.com/docs/commands/urbestack-protected-folder-del.md): Removes HTTP Basic authentication from a protected folder and deletes its folder users.
- [urbestack-protected-list](https://urbestack.com/docs/commands/urbestack-protected-list.md): Lists password-protected folders for a customer or reseller.
- [urbestack-protected-user-add](https://urbestack.com/docs/commands/urbestack-protected-user-add.md): Adds a user to a customer's password-protected folder.
- [urbestack-protected-user-del](https://urbestack.com/docs/commands/urbestack-protected-user-del.md): Removes the user named by --name from a protected folder and reloads Apache.
- [urbestack-protected-user-set](https://urbestack.com/docs/commands/urbestack-protected-user-set.md): Changes the password, username, enabled status, or access end time of a user in a protected folder.
