---
title: Stack File Explorer
description: Browse, view, edit, upload, rename, and chmod every file inside a stack's directory from the dashboard.
---

The file explorer gives you direct access to everything inside a stack's directory: configuration files, certificates, scripts, static assets, and any other files your containers depend on. It lives on the **Files** tab inside the stack editor, alongside the dedicated `compose.yaml` and `.env` editors.

<Frame>
  <img src="/images/stack-file-explorer/overview.png" alt="Files tab open with a populated tree on the left, a YAML file open in the editor on the right, and the Anatomy panel in the background" />
</Frame>

<Note>
  The explorer is scoped to the stack's own directory. You cannot browse other stacks or navigate above the stack root.
</Note>

## Opening the file explorer

1. Click any stack in the left sidebar.
2. Click **edit** in the right-hand Anatomy panel header to open the editor.
3. Switch to the **Files** tab.

The **files** shortcut button next to **edit** in the Anatomy header opens the editor and selects the Files tab in one click.

The file explorer is available on every Sencho tier. Read actions (browse, preview, download, inspect permissions) require **stack read** permission, which every signed-in role has by default. Write actions (upload, edit, create, rename, change permissions, delete) require **stack edit** permission on your account.

## Layout

The Files tab splits into two panes. The left pane holds the upload affordance, the new-folder button, and the directory tree. The right pane is the action bar plus the file viewer.

<Frame>
  <img src="/images/stack-file-explorer/layout-panes.png" alt="Files tab two-pane layout showing the upload widget and tree on the left and the file viewer on the right" />
</Frame>

## Browsing the directory tree

Folders sort before files, and entries within each group sort alphabetically.

Click a folder to expand or collapse it. Click a file to open it in the viewer on the right. Symlinks render with a chain icon and behave like files when clicked. Deleting a symlink removes only the link entry; the file it points to is untouched.

**Display cap.** Each directory render is capped at 1000 entries. A folder with more than 1000 children shows the first 1000 alphabetically with a footer noting how many entries the directory holds in total. The tree also has a filter input at the top of the list so you can narrow a large directory to the entries you care about without dropping to a shell.

## Protected files

The amber dot in the tree marks the five canonical stack files: `compose.yaml`, `compose.yml`, `docker-compose.yaml`, `docker-compose.yml`, and `.env`.

<Frame>
  <img src="/images/stack-file-explorer/protected-tree-marker.png" alt="File tree with amber dot markers next to compose.yaml and .env" />
</Frame>

Two behaviours follow from the marker:

- **Dedicated tab redirect.** Clicking `compose.yaml`, `compose.yml`, or `.env` jumps you to the matching **compose.yaml** or **.env** tab so the save-and-deploy controls stay in front of you. `docker-compose.yaml` and `docker-compose.yml` are still flagged as protected, but they open in the regular file viewer because they are not the canonical Sencho file.
- **Type-to-confirm delete.** All five protected names require typing the filename to confirm a delete. See the Deleting section below.

## Viewing files

When you click a text file, its contents appear in the editor on the right. The Monaco editor auto-detects the language from the extension.

| File type | Behaviour |
|-----------|-----------|
| Text file up to 2 MB | Rendered inline with syntax highlighting. |
| Text file over 2 MB | Panel with the filename, size, and a **Download** button. |
| Binary file | Same panel layout, label is `Binary file`. |

## Editing and saving

When you have stack edit permission, the editor opens in write mode. The toolbar shows the filename and a **Save** button that activates as soon as there are unsaved changes.

When you do not, the toolbar shows a `Read-only` chip and the editor refuses input.

<Frame>
  <img src="/images/stack-file-explorer/viewer-edit-mode.png" alt="Viewer toolbar showing the filename label and the Save button next to a YAML buffer" />
</Frame>

Click **Save** to write the file to disk. If you have unsaved edits and click a different file in the tree, a confirmation dialog asks whether to discard them; cancelling keeps you on the current file.

Saves use optimistic concurrency: the editor remembers when the file was last loaded, and a save that targets a stale version returns a "file changed elsewhere" notice with the current server-side content. Your typed buffer is preserved so you can review the new version and reapply your edits before saving again.

Writes are atomic at the filesystem level. Sencho stages the new content into a sibling temporary file, fsyncs, and promotes it via rename, so a crash or power loss never leaves a half-written target on disk.

<Warning>
  Editing a file does not restart any containers. If your stack reads the file at runtime (for example, a config file mounted as a volume), restart the relevant service after saving so the container picks up the new content.
</Warning>

## Creating files and folders

The toolbar **New folder** button at the top of the tree creates a folder in the currently selected directory (the parent of the file you have open, or the stack root if nothing is open).

Right-click any folder for **New File** and **New Folder** entries that scope to the right-clicked folder. These write controls appear only when your account has stack edit permission.

<Frame>
  <img src="/images/stack-file-explorer/new-file-dialog.png" alt="New file modal scoped to the nginx folder, with the file name field populated and a Create button" />
</Frame>

Filenames cannot be empty, cannot contain `/` or `\`, and cannot be `.` or `..`. The Create button stays disabled until the input passes validation.

## Uploading files

The dashed **Upload file** affordance at the top of the tree opens a file picker. You can also drag and drop a file onto the dashed zone; the border lights up in the brand colour when a file is hovered over a valid drop target. Uploads are one file at a time.

| Limit | Value |
|-------|-------|
| Maximum file size | 25 MB. Uploads above the limit return a 413 error with `TOO_LARGE`. |
| Target directory | The currently selected directory, or the stack root if no file is open. |
| Same-name files | A confirmation dialog asks whether to replace the existing file. Cancelling keeps the original. |

The upload affordance is hidden for users without stack edit permission.

<Tip>
  For bulk transfers or files above 25 MB, use `scp` or `rsync` from your workstation directly to the stack directory on the host.
</Tip>

## Downloading files

When a file is selected, the right pane action bar shows **Download**. Files stream straight to your browser. Files that exceed the inline preview limit also expose a Download button inside the oversized-file panel itself.

## Renaming

Right-click any file or folder and choose **Rename**. The dialog accepts a new name following the same rules as creation.

Rename appears only when your account has stack edit permission. The rename is in-place; cross-directory moves are not supported. To move an entry between directories, copy it via the host shell or upload to the new location and delete the original.

## Permissions (chmod)

Right-click any file and choose **Permissions** to inspect or edit its Unix mode bits. The dialog shows a 3 by 3 grid of `r` / `w` / `x` toggles for Owner, Group, and Other, plus the current octal value.

<Frame>
  <img src="/images/stack-file-explorer/permissions-dialog.png" alt="Permissions modal for a file showing the rwx grid for Owner, Group, and Other plus the octal value 644" />
</Frame>

When your account has stack edit permission, the toggles are interactive and the footer adds **Save**. For viewer accounts the dialog opens read-only: the toggles render the current state and the footer shows only **Close**.

<Note>
  Permissions are applied with `chmod`. Permission changes on symlinks are not supported; edit the target file's permissions directly.
</Note>

## Deleting

There are three delete entry points. All three require stack edit permission, and all three open the same confirmation modal.

- **Toolbar delete.** With a file open in the viewer, click **Delete** in the right-pane action bar.
- **Context-menu delete.** Right-click any file or folder in the tree and choose **Delete**.
- **Non-empty folder delete.** The first attempt is non-recursive. If the folder has contents, the modal switches to `This folder is not empty. Delete everything inside?` with a destructive **Delete all** button.

When the entry is one of the five protected names, the modal asks you to type the filename before the destructive button activates.

<Frame>
  <img src="/images/stack-file-explorer/delete-protected-confirm.png" alt="Delete confirmation modal for compose.yaml requiring the user to type the filename before the destructive button activates" />
</Frame>

<Warning>
  Deletes are permanent. Sencho does not keep a trash bin or undo history for file operations.
</Warning>

## Context menu reference

<Frame>
  <img src="/images/stack-file-explorer/context-menu-folder.png" alt="Right-click menu on a folder showing New File, New Folder, Rename, and Delete entries" />
</Frame>

<Frame>
  <img src="/images/stack-file-explorer/context-menu-file.png" alt="Right-click menu on a file showing Rename, Permissions, and Delete entries" />
</Frame>

| Right-click target | Admin entries (with stack edit) | Viewer entries |
|---|---|---|
| Folder | New File, New Folder, Rename, Delete | No write entries |
| File | Rename, Permissions, Delete | Permissions (read-only) |

The Permissions dialog opens for everyone; only users with stack edit permission can save changes.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Files tab is empty or returns a 403">
    The signed-in role lacks **stack read** permission for this stack. Ask an admin to grant the permission on your account, or sign in with a role that already has it.
  </Accordion>
  <Accordion title="Cannot delete compose.yaml or .env">
    The five canonical stack files (`compose.yaml`, `compose.yml`, `docker-compose.yaml`, `docker-compose.yml`, `.env`) are protected because removing them mid-life breaks the stack. To delete a stack entirely, use **Delete stack** in the stack toolbar's overflow menu rather than removing these files individually.
  </Accordion>
  <Accordion title="Save returns 'file changed elsewhere'">
    Another writer (a teammate, a deploy hook, or an out-of-band edit on the host) saved the file after you loaded it. Use the diff to compare your edits against the current version, then save again. Your typed buffer is kept so you do not have to retype your changes.
  </Accordion>
  <Accordion title="Upload returns DISK_FULL">
    The disk hosting the stack's compose directory has no free space. Check the volume mounted as `COMPOSE_DIR` (defaults to `/app/compose` inside the Sencho container) and free up space, or move the volume to a larger disk.
  </Accordion>
  <Accordion title="File shows as 'Binary file detected' but it is a text file">
    The binary detection heuristic flagged null bytes or a high proportion of non-printable characters in the file's first kilobytes. This can happen with certain encodings, non-UTF-8 byte sequences, or unusual line-ending mixes. Click **Open as text anyway** on the binary panel to re-fetch the file as UTF-8 text and edit it in the inline viewer. Files above the 2 MB preview limit still need a Download.
  </Accordion>
  <Accordion title="Upload fails with a 413 error">
    The file exceeds the 25 MB per-file upload limit. Compress or split the file before uploading, or transfer it via `scp` or `rsync` directly to the stack directory on the host.
  </Accordion>
  <Accordion title="Cannot delete a folder">
    The first delete attempt is non-recursive. If the folder is not empty, the dialog switches to `This folder is not empty. Delete everything inside?`. Click **Delete all** to remove the folder and its contents. If the error persists, check whether a running container has an open file handle inside that directory; stop the relevant service and retry.
  </Accordion>
  <Accordion title="File saved but the container still reads the old content">
    The container caches the file at startup, or the mount is configured read-only inside the container. Restart the service after saving so the container picks up the new file.
  </Accordion>
  <Accordion title="Download button is missing">
    The Download button appears in the right-pane action bar only when a file is selected in the tree. Click any text or binary file to open it, and the button activates.
  </Accordion>
  <Accordion title="A large directory shows a 'N total entries' footer">
    Each directory render is capped at 1000 entries to keep the tree responsive. Use the filter input above the tree to narrow the list, or drop into a host shell with `cd` into the stack directory if you need to work with entries past the cap.
  </Accordion>
  <Accordion title="Write controls are missing">
    Upload, create, rename, chmod save, and delete require **stack edit** permission. Viewer accounts can browse, preview text files, and inspect permissions in read-only mode.
  </Accordion>
</AccordionGroup>
