File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -257,10 +257,15 @@ if ! conda --version &> /dev/null ; then
257257 chown -R " ${USERNAME} :conda" " ${CONDA_DIR} "
258258 chmod -R g+r+w " ${CONDA_DIR} "
259259
260- # Only set permissions if CONDA_DIR exists and is a directory
261- if [ -d " ${CONDA_DIR} " ]; then
262- chmod g+s " ${CONDA_DIR} "
263- set_directory_permissions " ${CONDA_DIR} "
260+ # Set setgid bit on all directories - use find+xargs if available, fallback to recursive function
261+ if command -v find > /dev/null && command -v xargs > /dev/null; then
262+ find " ${CONDA_DIR} " -type d -print0 | xargs -n 1 -0 chmod g+s
263+ else
264+ # Fallback for systems without find or xargs
265+ if [ -d " ${CONDA_DIR} " ]; then
266+ chmod g+s " ${CONDA_DIR} "
267+ set_directory_permissions " ${CONDA_DIR} "
268+ fi
264269 fi
265270
266271 # Temporary fixes
You can’t perform that action at this time.
0 commit comments