---
title: File permissions
url: https://photostructure.com/faq/file-permissions/
description: How to fix permission denied errors in PhotoStructure
keywords: troubleshooting, Docker, installation, permissions
---


Permission denied errors (EACCES or EPERM) happen when PhotoStructure can't access files it needs.

## Common causes

1. **Docker volume permissions**: The container user doesn't match your host user
2. **Library on a network drive**: NFS or SMB shares with restrictive permissions
3. **Read-only filesystem**: Your photos are on a read-only mount
4. **Port below 1024**: Binding to privileged ports requires root

## Docker fixes

Make sure the container runs as your user:

```bash
docker run -e PUID=$(id -u) -e PGID=$(id -g) ...
```

See [Docker setup](/server/photostructure-for-docker/) for details.

## Network drive fixes

For NFS mounts, ensure the `no_root_squash` option isn't blocking access, or run PhotoStructure as the user that owns the files.

For SMB/CIFS mounts, specify `uid` and `gid` in your mount options.

## Port permission fix

PhotoStructure defaults to port 1787, which doesn't require elevated privileges. If you've configured a port below 1024, either use a higher port or run with appropriate capabilities.

