mirror of
https://gh.con.sh/https://github.com/plexinc/pms-docker
synced 2025-04-17 14:38:59 +00:00
Only chown files that have incorrect user/group
Not all files will need to change user/group and doing for every file can take a very long time for large libraries. This commit will use find to find files/dir that have incorrect user/group and change them. Hopefully this should be quicker than going through and changing every single file.
This commit is contained in:
parent
13e780cda5
commit
716ed27eca
|
@ -67,10 +67,10 @@ fi
|
|||
if [ "${CHANGE_CONFIG_DIR_OWNERSHIP,,}" = "true" ]; then
|
||||
if [ -f "${prefFile}" ]; then
|
||||
if [ ! "$(stat -c %u "${prefFile}")" = "$(id -u plex)" ]; then
|
||||
chown -R plex:plex /config
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown plex:plex
|
||||
fi
|
||||
else
|
||||
chown -R plex:plex /config
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown plex:plex
|
||||
fi
|
||||
chown -R plex:plex /transcode
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user