Enhance Dockerfile to create a writable workspace under /srv/LeafWeb and update piscal_manager.sh to check for write permissions on working directories.
This commit is contained in:
@@ -88,7 +88,7 @@ for candidate in \
|
||||
"$PWD/$directory_name" \
|
||||
"/srv/$directory_name"
|
||||
do
|
||||
if [ -d "$candidate/$input_directory_name" ]; then
|
||||
if [ -d "$candidate/$input_directory_name" ] && [ -w "$candidate" ]; then
|
||||
working_directory="$candidate"
|
||||
break
|
||||
fi
|
||||
@@ -109,6 +109,10 @@ if [ "$task" = "launch" ] || [ "$task" = "get_status" ] || [ "$task" = "get_stat
|
||||
echo "working directory $working_directory not found"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -w "$working_directory" ]; then
|
||||
echo "working directory $working_directory is not writable"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$input_directory" ]; then
|
||||
echo "input directory $input_directory not found"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user