fix samba write permissions and document UID requirement
The dperson/samba image uses UID/GID 1001 internally regardless of the USERID env var. The host share directory must be owned by 1001:1001 for writes to succeed. Add force user/group to smb.conf as an extra safety net, and document the chown step in the README. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
bf2d9e40fd
commit
2ad7697142
2 changed files with 9 additions and 1 deletions
|
|
@ -26,6 +26,12 @@
|
||||||
mkdir -p /home/padriano/share
|
mkdir -p /home/padriano/share
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Samba container runs as UID/GID 1001 internally, so the share directory must be owned by that user:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chown 1001:1001 /home/padriano/share
|
||||||
|
```
|
||||||
|
|
||||||
3. Bring the full stack up:
|
3. Bring the full stack up:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -127,7 +133,7 @@ docker inspect forgejo
|
||||||
|
|
||||||
### samba
|
### samba
|
||||||
|
|
||||||
- Shared directory on the host: `/home/padriano/share`
|
- Shared directory on the host: `/home/padriano/share` — must be owned by `1001:1001` (the UID/GID the container uses internally); without this, the share mounts on the Mac but files cannot be written
|
||||||
- Uses a macvlan network with static IP `192.168.1.247` — avoids port 445 conflict with the `timemachine` container
|
- Uses a macvlan network with static IP `192.168.1.247` — avoids port 445 conflict with the `timemachine` container
|
||||||
- Config stored at `samba/smb.conf`; the `[Share]` section is the only exported share
|
- Config stored at `samba/smb.conf`; the `[Share]` section is the only exported share
|
||||||
- Avahi service file at `samba/avahi-smb.service` advertises the share for Finder sidebar discovery (installed to `/etc/avahi/services/samba.service` on the host)
|
- Avahi service file at `samba/avahi-smb.service` advertises the share for Finder sidebar discovery (installed to `/etc/avahi/services/samba.service` on the host)
|
||||||
|
|
|
||||||
|
|
@ -45,3 +45,5 @@
|
||||||
directory mask = 0775
|
directory mask = 0775
|
||||||
inherit permissions = no
|
inherit permissions = no
|
||||||
valid users = samba
|
valid users = samba
|
||||||
|
force user = samba
|
||||||
|
force group = samba
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue