mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
Making sure chmod and chown does not follow symlinks
This commit is contained in:
parent
d0108b4ae3
commit
c981edee63
3 changed files with 21 additions and 9 deletions
12
func/main.sh
12
func/main.sh
|
@ -1085,3 +1085,15 @@ vesta_generate_pass() {
|
|||
done
|
||||
echo "$PASS"
|
||||
}
|
||||
|
||||
# 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