Closed borzaka closed 4 years ago
The whole cache directory is owned by www-data
within the container which is:
UID: 33
GID: 33
The folders are set to permissions 700
and files as 600
You're trying to remove as a user that does not have ownership to touch any of those folders and files.
chmod -R 760 /home/steamcache/cache/data
and make sure that your steamcache user is added to GID 33 which is likely www-data
or http
depending on your distro.
New files will be created with permissions 600
so any time you plan to do a mass removal you'll need to run the chmod
command above again.
Added my steamcache user to www-data
group. I'am using Debian 9 stretch 64-bit PC (amd64).
$ groups
steamcache www-data docker
But when I try to change the permissions, this happens:
$ chmod -R 760 /home/steamcache/cache/data
chmod: changing permissions of '/home/steamcache/cache/data': Operation not permitted
chmod: changing permissions of '/home/steamcache/cache/data/cache': Operation not permitted
chmod: cannot read directory '/home/steamcache/cache/data/cache': Permission denied
Or I should execute this command as root?
ls -la
info up to home directory:
I can't enter to the cache
folder in here.
/cache/data$ ls -la
total 12
drwxr-xr-x 3 www-data www-data 4096 Mar 9 16:18 .
drwxr-xr-x 4 root root 4096 Mar 9 16:18 ..
drwx------ 258 www-data root 4096 Mar 15 12:27 cache
/cache$ ls -la
total 16
drwxr-xr-x 4 root root 4096 Mar 9 16:18 .
drwxr-xr-x 3 steamcache steamcache 4096 Mar 9 16:35 ..
drwxr-xr-x 3 www-data www-data 4096 Mar 9 16:18 data
drwxr-xr-x 2 www-data www-data 4096 Mar 9 16:18 logs
$ ls -la
total 28
drwxr-xr-x 3 steamcache steamcache 4096 Mar 9 16:35 .
drwxr-xr-x 6 root root 4096 Mar 9 15:45 ..
-rw------- 1 steamcache steamcache 2463 Mar 20 16:19 .bash_history
-rw-r--r-- 1 steamcache steamcache 220 Mar 9 15:45 .bash_logout
-rw-r--r-- 1 steamcache steamcache 3526 Mar 9 15:45 .bashrc
drwxr-xr-x 4 root root 4096 Mar 9 16:18 cache
-rw-r--r-- 1 steamcache steamcache 675 Mar 9 15:45 .profile
Yeah, you'll probably want to do this operation as root (or a container subshell docker exec -it lancache /bin/bash
)
@borzaka per @VibroAxe's suggestions, you want to either run it as root or you can run the command within the container itself: docker exec it lancache chmod -R 760 /data/cache
.
Closing as no response for > 6 months
Describe the issue you are having
I wanted to test the caching service, and as described in the readme, I tried to clear the
/data/cache
folder after a couple of days of running, but I couldn't over FTP.How are you running the container(s)?
I have created a
steamcache
user, and added to thedocker
group.192.168.30.250
is myHOST_IP
Side question: what are the toughs of my custom environment variable settings? I don't understand some of the default values. 3650 days cache max age? 3650 days logfile retention? These are too much, aren't these?
DNS Configuration
Output of container(s)
The
error.log
is empty, and theaccess.log
is huge as probably should be, this is an extract:Linux distro
Debian 9 stretch 64-bit PC (amd64)