Commit 3bd23229 authored by Spyros Argyropoulos's avatar Spyros Argyropoulos Committed by Christian Gutschow
Browse files

Make sure GRID files are readable by all users

parent af722560
Pipeline #1487386 skipped
......@@ -58,10 +58,10 @@ check_added_files:
script:
- ./scripts/check_added_files.sh
#-----------------------------------------------------
# BUILD: CHECK GRID FILE READABILITY BY ATLCVMFS
#-----------------------------------------------------
check_grid_atlcvmfs:
#-----------------------------------
# BUILD: CHECK GRID FILE READABILITY
#-----------------------------------
check_grid_readability:
stage: check_commit
tags:
- cvmfs
......@@ -74,7 +74,7 @@ check_grid_atlcvmfs:
before_script:
- echo ${K8S_SECRET_SERVICE_PASSWORD} | kinit ${SERVICE_ACCOUNT}@CERN.CH
script:
- ./scripts/check_grid_file_atlcvmfs.sh
- ./scripts/check_grid_file_readability.sh
#-----------------------------------------------------
# BUILD: CHECK GRID FILE SIZE
......
......@@ -16,6 +16,7 @@ if (( ${#changed[@]} == 0 )) ; then
fi
basedir=$PWD
fail=false
# Loop over all links
for file in "${changed[@]}" ; do
......@@ -68,7 +69,7 @@ for file in "${changed[@]}" ; do
echo "OK: mcgensvc can read $dirlink"
else
echo "ERROR: mcgensvc cannot read $dirlink"
exit 1
fail=true
fi
# atlcvmfs readability test
......@@ -76,11 +77,23 @@ for file in "${changed[@]}" ; do
echo "OK: atlcvmfs can read $dirlink"
else
echo "ERROR: atlcvmfs cannot read $dirlink"
exit 2
fail=true
fi
# Check if the file is readable by all
access=$(eos $HOST ls -l $link 2>/dev/null | awk '{print $1}')
if [[ $access =~ ^.r..r..r.. ]] ; then
echo "OK: file $link is readable by all users"
else
echo "ERROR: file $link is not readable by all users. The permissions are set to: $access"
fail=true
fi
cd $basedir
done
exit 0
if $fail ; then
exit 1
fi
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment