From 15f9083068da904bb4ee339566d6de79249ce493 Mon Sep 17 00:00:00 2001 From: MounaSafiHarab Date: Tue, 21 Jun 2016 14:04:01 -0400 Subject: [PATCH] Creation of mkdir with correct permissions when user=apache (#134) * Creation of mkdir with correct permissions when user=apache * set umask of the user launching the MRI pipeline to allow directory write permissions by the group --- environment | 1 + imaging_install.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/environment b/environment index b707ba72e..3f66687fa 100644 --- a/environment +++ b/environment @@ -4,4 +4,5 @@ export TMPDIR=/tmp export LORIS_CONFIG=/data/%PROJECT%/bin/mri/dicom-archive source %MINC_TOOLKIT_DIR%/minc-toolkit-config.sh +umask 0002 diff --git a/imaging_install.sh b/imaging_install.sh index 8f8317ae9..2beb8ae36 100755 --- a/imaging_install.sh +++ b/imaging_install.sh @@ -148,6 +148,9 @@ else read -p "Cannot find the apache group name for your installation. Please provide? " group fi +# Making lorisadmin part of the apache group +sudo usermod -a -G $group $USER + #Setting group permissions to apache and group ID for all files/dirs under /data/$PROJ/data sudo chgrp $group -R /data/$PROJ/data/ sudo chmod -R g+s /data/$PROJ/data/