* fix DIRS_MODE - add execute bit for other users
This commit is contained in:
		@ -14,6 +14,8 @@ WP_CONTENT_DIRS=(
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
export WEB_GID=33
 | 
			
		||||
export DIRS_MODE=775
 | 
			
		||||
export FILES_MODE=664
 | 
			
		||||
 | 
			
		||||
echo -n "Check sudo permissions... "
 | 
			
		||||
 | 
			
		||||
@ -48,18 +50,18 @@ perms() {
 | 
			
		||||
#    echo "Fixing permissions for dirs"
 | 
			
		||||
    # shellcheck disable=SC2038
 | 
			
		||||
    # shellcheck disable=SC2016
 | 
			
		||||
    find $TMP_DIR/ -maxdepth 1 -type f -name "dirs-without-spaces-part-*" | xargs -I {} bash -c 'chmod 774 `cat {}`'
 | 
			
		||||
    find $TMP_DIR/ -maxdepth 1 -type f -name "dirs-without-spaces-part-*" | xargs -I {} bash -c "chmod $DIRS_MODE `cat {}`"
 | 
			
		||||
 | 
			
		||||
#    echo "Fixing permissions for files"
 | 
			
		||||
    # shellcheck disable=SC2038
 | 
			
		||||
    # shellcheck disable=SC2016
 | 
			
		||||
    find $TMP_DIR/ -maxdepth 1 -type f -name "files-without-spaces-part-*" | xargs -I {} bash -c 'chmod 664 `cat {}`'
 | 
			
		||||
    find $TMP_DIR/ -maxdepth 1 -type f -name "files-without-spaces-part-*" | xargs -I {} bash -c "chmod $FILES_MODE `cat {}`"
 | 
			
		||||
 | 
			
		||||
#    echo "Fixing permissions for dirs with spaces"
 | 
			
		||||
    cat $TMP_DIR/dirs-with-spaces | xargs -I {} chmod 775 "{}"
 | 
			
		||||
    cat $TMP_DIR/dirs-with-spaces | xargs -I {} chmod $DIRS_MODE "{}"
 | 
			
		||||
 | 
			
		||||
#    echo "Fixing permissions for files with spaces"
 | 
			
		||||
    cat $TMP_DIR/files-with-spaces | xargs -I {} chmod 664 "{}"
 | 
			
		||||
    cat $TMP_DIR/files-with-spaces | xargs -I {} chmod $FILES_MODE "{}"
 | 
			
		||||
 | 
			
		||||
#    echo "Removing temporary files"
 | 
			
		||||
    rm $TMP_DIR/files-*
 | 
			
		||||
@ -68,7 +70,7 @@ perms() {
 | 
			
		||||
  else
 | 
			
		||||
    echo -n "and fixing permission for this file... "
 | 
			
		||||
#    echo "Fixing permissions"
 | 
			
		||||
    chmod 664 "${TARGET}"
 | 
			
		||||
    chmod $FILES_MODE "${TARGET}"
 | 
			
		||||
    echo "ok"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user