mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 21:34:11 -07:00
Making sure chmod and chown does not follow symlinks
This commit is contained in:
parent
45b13a2105
commit
93eec18723
1 changed files with 12 additions and 0 deletions
12
func/main.sh
12
func/main.sh
|
@ -954,3 +954,15 @@ format_aliases() {
|
||||||
aliases=$(echo "$aliases" |tr '\n' ',' |sed -e "s/,$//")
|
aliases=$(echo "$aliases" |tr '\n' ',' |sed -e "s/,$//")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Simple chmod wrapper that skips symlink files after glob expand
|
||||||
|
# Taken from HestiaCP
|
||||||
|
no_symlink_chmod() {
|
||||||
|
local filemode=$1; shift;
|
||||||
|
|
||||||
|
for i in "$@"; do
|
||||||
|
[[ -L ${i} ]] && continue
|
||||||
|
|
||||||
|
chmod "${filemode}" "${i}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue