0

following docker command:

sudocker run --restart unless-stopped --name lancache -v /mnt/steamcache/CacheServer/cache:/data/cache -v /mnt/steamcache/CacheServer/logs:/data/logs -p My-Server-IP:80:80 lancachenet/monolithic:latest

also my mount command:

sudo mount -t cifs -o username=MYUSERNAME //My-Samba-File-Server-IP/games /mnt/steamcache

Docker is able to create two folders in my samba share but hasnt got permission to create folders into that folder "cache".

2020/09/01 16:41:28 [crit] 1752#1752: *1 mkdir() "/data/cache/cache/7d" failed (13: Permission denied) while reading upstream, client: Client-IP, server: , request: "GET /depot/1/manifest/5928322771446233610/5 HTTP/1.1", upstream: "http://155.133.248.29:80/depot/1/manifest/5928322771446233610/5", host: "cache18-ams1.steamcontent.com" 2020/09/01 16:41:28 [crit] 1752#1752: *2 mkdir() "/data/cache/cache/c2" failed (13: Permission denied) while reading upstream, client: Client-IP, server: , request: "GET /depot/3/manifest/8096513071444961518/5 HTTP/1.1", upstream: "http://155.133.248.29:80/depot/3/manifest/8096513071444961518/5", host: "cache18-ams1.steamcontent.com" 2020/09/01 16:41:28 [crit] 1754#1754: *3 mkdir() "/data/cache/cache/3e" failed (13: Permission denied) while reading upstream, client: Client-IP, server: , request: "GET /depot/2/manifest/2139852524811213490/5 HTTP/1.1", upstream: "http://155.133.248.13:80/depot/2/manifest/2139852524811213490/5", host: "cache2-ams1.steamcontent.com" 2020/09/01 16:41:28 [crit] 1753#1753: *5 mkdir() "/data/cache/cache/78" failed (13: Permission denied) while reading upstream, client: Client-IP, server: , request: "GET /depot/74/manifest/5000716531281502924/5 HTTP/1.1", upstream: "http://155.133.248.13:80/depot/74/manifest/5000716531281502924/5", host: "cache2-ams1.steamcontent.com" 2020/09/01 16:44:27 [crit] 1755#1755: *12 mkdir() "/data/cache/cache/2b" failed (13: Permission denied) while reading upstream, client: Client-IP, server: , request: "GET /appinfo/1042420/sha/c87d5ae3d06609fd093145ed24417160ca271eef.txt.gz HTTP/1.1", upstream: "http://95.101.90.177:80/appinfo/1042420/sha/c87d5ae3d06609fd093145ed24417160ca271eef.txt.gz", host: "clientconfig.akamai.steamstatic.com"

Any suggestions what am i doing wrong?

Thank you.

EDIT: I use Ubuntu on a vm. Samba-Share belongs to Synology NAS.

No one has a clue?

Hades85
  • 103
  • 1
  • 1
  • 10

1 Answers1

1

i believe you can solve this problem in 2 steps:

  1. Get your host user uid and gid with command:

    id -u && id -g

  2. Add -u to you run command [Username or UID (format: <name|uid>[:<group|gid>])]

Ex. Lets say your host user has UID=1000 and GID=1000 your docker run command should be:

docker run \
--restart unless-stopped \
--name lancache \
-v /mnt/steamcache/CacheServer/cache:/data/cache \
-v /mnt/steamcache/CacheServer/logs:/data/logs \
-p My-Server-IP:80:80 \
-u 1000:1000 \
lancachenet/monolithic:latest

Or to put it all together:

docker run \
--restart unless-stopped \
--name lancache \
-v /mnt/steamcache/CacheServer/cache:/data/cache \
-v /mnt/steamcache/CacheServer/logs:/data/logs \
-p My-Server-IP:80:80 \
-u "$(id -u):$(id -g)" \
lancachenet/monolithic:latest

Doing that you are avoiding a lot of permission errors between docker container and host.

ProMo
  • 21
  • 2