Update the Docker entrypoint UID and GUID code
Update the ownership of files when the UID of GUID are changed. GitLab issue #650. Allow changing the GID of the mayan user to existing values. GitLab issue #652. Thanks to Fabian (@ruffy91) for both reports. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -17,6 +17,14 @@
|
|||||||
* Increase mailing profile password field max length
|
* Increase mailing profile password field max length
|
||||||
from 48 to 128 characters. GitLab issue #657.
|
from 48 to 128 characters. GitLab issue #657.
|
||||||
Thanks to sigsec (@sigsec) for the report.
|
Thanks to sigsec (@sigsec) for the report.
|
||||||
|
* Update the Docker entrypoint to update the ownership
|
||||||
|
of files when the UID of GUID are changed.
|
||||||
|
GitLab issue #650. Thanks to Fabian (@ruffy91)
|
||||||
|
for the report.
|
||||||
|
* Update the Docker entrypoint to allow changing
|
||||||
|
the GID of the mayan user to existing values.
|
||||||
|
GitLab issue #652. Thanks to Fabian (@ruffy91)
|
||||||
|
for the report.
|
||||||
|
|
||||||
3.2.6 (2019-07-10)
|
3.2.6 (2019-07-10)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ CONCURRENCY_ARGUMENT=--concurrency=
|
|||||||
DEFAULT_USER_UID=1000
|
DEFAULT_USER_UID=1000
|
||||||
DEFAULT_USER_GUID=1000
|
DEFAULT_USER_GUID=1000
|
||||||
|
|
||||||
|
MAYAN_USER_UID=${MAYAN_USER_UID:-${DEFAULT_USER_UID}}
|
||||||
|
MAYAN_USER_GUID=${MAYAN_USER_GUID:-${DEFAULT_USER_GUID}}
|
||||||
|
|
||||||
export MAYAN_DEFAULT_BROKER_URL=redis://127.0.0.1:6379/0
|
export MAYAN_DEFAULT_BROKER_URL=redis://127.0.0.1:6379/0
|
||||||
export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0
|
export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0
|
||||||
|
|
||||||
@@ -30,9 +33,18 @@ MAYAN_WORKER_FAST_CONCURRENCY=${MAYAN_WORKER_FAST_CONCURRENCY:-1}
|
|||||||
MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-1}
|
MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-1}
|
||||||
MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1}
|
MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1}
|
||||||
|
|
||||||
echo "mayan: changing uid/guid"
|
update_uid_gid() {
|
||||||
usermod mayan -u ${MAYAN_USER_UID:-${DEFAULT_USER_UID}}
|
echo "mayan: update_uid_gid()"
|
||||||
groupmod mayan -g ${MAYAN_USER_GUID:-${DEFAULT_USER_GUID}}
|
groupmod mayan -g ${MAYAN_USER_GUID} 2>/dev/null || true
|
||||||
|
usermod mayan -u ${MAYAN_USER_UID} -g ${MAYAN_USER_GUID} 2>/dev/null
|
||||||
|
|
||||||
|
if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GUID} -ne ${DEFAULT_USER_GUID} ]; then
|
||||||
|
echo "mayan: Updating file ownership. This might take a while if there are many documents."
|
||||||
|
chown mayan:mayan ${MAYAN_INSTALL_DIR} ${MAYAN_STATIC_ROOT} ${MAYAN_MEDIA_ROOT}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
update_uid_gid
|
||||||
|
|
||||||
if [ "$MAYAN_WORKER_FAST_CONCURRENCY" -eq 0 ]; then
|
if [ "$MAYAN_WORKER_FAST_CONCURRENCY" -eq 0 ]; then
|
||||||
MAYAN_WORKER_FAST_CONCURRENCY=
|
MAYAN_WORKER_FAST_CONCURRENCY=
|
||||||
|
|||||||
@@ -24,6 +24,14 @@ Changes
|
|||||||
- Increase mailing profile password field max length
|
- Increase mailing profile password field max length
|
||||||
from 48 to 128 characters. GitLab issue #657.
|
from 48 to 128 characters. GitLab issue #657.
|
||||||
Thanks to sigsec (@sigsec) for the report.
|
Thanks to sigsec (@sigsec) for the report.
|
||||||
|
- Update the Docker entrypoint to update the ownership
|
||||||
|
of files when the UID of GUID are changed.
|
||||||
|
GitLab issue #650. Thanks to Fabian (@ruffy91)
|
||||||
|
for the report.
|
||||||
|
- Update the Docker entrypoint to allow changing
|
||||||
|
the GID of the mayan user to existing values.
|
||||||
|
GitLab issue #652. Thanks to Fabian (@ruffy91)
|
||||||
|
for the report.
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
@@ -116,6 +124,8 @@ Backward incompatible changes
|
|||||||
Bugs fixed or issues closed
|
Bugs fixed or issues closed
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
- :gitlab-issue:`650` Permission denied when MAYAN_USER_UID and MAYAN_USER_GUID are set
|
||||||
|
- :gitlab-issue:`652` MAYAN_USER_GUID cannot be set to specific values
|
||||||
- :gitlab-issue:`654` Internal Server Error, Document Checkout
|
- :gitlab-issue:`654` Internal Server Error, Document Checkout
|
||||||
- :gitlab-issue:`655` Index setup tree view shows two times the "enabled" field instead of "Link documents"
|
- :gitlab-issue:`655` Index setup tree view shows two times the "enabled" field instead of "Link documents"
|
||||||
- :gitlab-issue:`657` Mailer password length restriction is too short
|
- :gitlab-issue:`657` Mailer password length restriction is too short
|
||||||
|
|||||||
Reference in New Issue
Block a user