Submit
Path:
~
/
/
opt
/
psa
/
admin
/
sbin
/
modules
/
letsencrypt
/
File Content:
chown-config-dirs.sh
#!/bin/bash -e declare -r WORK_DIR="${1?Directory is not set}" declare -r OWNER="${2?Owner is not set}" echo "$OWNER" echo "$WORK_DIR" function chownDirs() { local dir="${1?Directory is not set}" local owner="${2?Owner is not set}" [ -d "${dir}" ] && find "${dir}" -maxdepth 1 -type d -print0 | xargs -0 chown "${owner}" } if [ -d "${WORK_DIR}/etc" ] ; then chown "${OWNER}" "${WORK_DIR}/etc" chownDirs "${WORK_DIR}/etc/archive" "${OWNER}" chownDirs "${WORK_DIR}/etc/live" "${OWNER}" fi if [ -d "${WORK_DIR}/root/etc" ] ; then chown "${OWNER}" "${WORK_DIR}/root" chown "${OWNER}" "${WORK_DIR}/root/etc" chownDirs "${WORK_DIR}/root/etc/archive" "${OWNER}" chownDirs "${WORK_DIR}/root/etc/live" "${OWNER}" fi
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
chown-config-dirs.sh
752 bytes
0755
websrvmng.bat
50 bytes
0755
N4ST4R_ID | Naxtarrr