diff --git a/README.md b/README.md
index 2edebc6..8ee3aa8 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,7 @@ docker create \
-e PUID=1000 \
-e PGID=1000 \
-e VERSION=docker \
+ -e UMASK_SET=022 `#optional` \
-v :/config \
-v :/data/tvshows \
-v :/data/movies \
@@ -79,6 +80,7 @@ services:
- PUID=1000
- PGID=1000
- VERSION=docker
+ - UMASK_SET=022 #optional
volumes:
- :/config
- :/data/tvshows
@@ -97,6 +99,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e VERSION=docker` | Set whether to update plex or not - see Application Setup section. |
+| `-e UMASK_SET=022` | control permissions of files and directories created by Plex |
| `-v /config` | Plex library location. *This can grow very large, 50gb+ is likely for a large collection.* |
| `-v /data/tvshows` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. |
| `-v /data/movies` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. |
@@ -233,6 +236,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
+* **06.08.19:** - Add variable for setting UMASK.
* **10.07.19:** - Fix permissions for tuner (/dev/dvb) devices.
* **20.05.19:** - Bugfix do not allow Root group for Intel QuickSync ownership rules.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
diff --git a/readme-vars.yml b/readme-vars.yml
index de87cb0..4e38465 100644
--- a/readme-vars.yml
+++ b/readme-vars.yml
@@ -30,6 +30,10 @@ param_net_desc: "Use Host Networking"
param_usage_include_env: true
param_env_vars:
- { env_var: "VERSION", env_value: "docker", desc: "Set whether to update plex or not - see Application Setup section."}
+# optional env variables
+opt_param_usage_include_env: true
+opt_param_env_vars:
+ - { env_var: "UMASK_SET", env_value: "022", desc: "control permissions of files and directories created by Plex"}
optional_parameters: |
*Special note* - If you'd like to run Plex without requiring `--net=host` (`NOT recommended`) then you will need the following ports in your `docker create` command:
@@ -82,6 +86,7 @@ app_setup_block: |
# changelog
changelogs:
+ - { date: "06.08.19:", desc: "Add variable for setting UMASK." }
- { date: "10.07.19:", desc: "Fix permissions for tuner (/dev/dvb) devices." }
- { date: "20.05.19:", desc: "Bugfix do not allow Root group for Intel QuickSync ownership rules." }
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
diff --git a/root/etc/services.d/plex/run b/root/etc/services.d/plex/run
index 5fbbc93..6996fcd 100644
--- a/root/etc/services.d/plex/run
+++ b/root/etc/services.d/plex/run
@@ -1,5 +1,10 @@
#!/usr/bin/with-contenv bash
+
+UMASK_SET=${UMASK_SET:-022}
+
+umask "$UMASK_SET"
+
echo "Starting Plex Media Server."
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)