don't change existing files and folders

This commit is contained in:
AJ ONeal 2017-11-07 14:59:31 -07:00
parent 8ee24fcd77
commit 6ae1e463c9
1 changed files with 3 additions and 2 deletions

View File

@ -123,7 +123,8 @@ echo "User $my_user Group $my_group"
$sudo_cmd chown -R $my_user:$my_group $my_tmp/* $sudo_cmd chown -R $my_user:$my_group $my_tmp/*
$sudo_cmd chown root:root $my_tmp/* $sudo_cmd chown root:root $my_tmp/*
$sudo_cmd chown root:root $my_tmp $sudo_cmd chown root:root $my_tmp
rsync -a $my_tmp/ $my_root/ # don't change permissions on /, /etc, etc
rsync -a --ignore-existing $my_tmp/ $my_root/
rsync -a --ignore-existing $my_app_dist/etc/$my_name/$my_name.yml $my_root/etc/$my_name/$my_name.yml rsync -a --ignore-existing $my_app_dist/etc/$my_name/$my_name.yml $my_root/etc/$my_name/$my_name.yml
source ./installer/install-system-service.sh source ./installer/install-system-service.sh
@ -134,7 +135,7 @@ $sudo_cmd chown -R $my_user:$my_group $my_root/var/www $my_root/srv/www
# make sure the files are all read/write for the owner and group, and then set # make sure the files are all read/write for the owner and group, and then set
# the setuid and setgid bits so that any files/directories created inside these # the setuid and setgid bits so that any files/directories created inside these
# directories have the same owner and group. # directories have the same owner and group.
$sudo_cmd chmod -R ug+rwX /opt/$my_name $sudo_cmd chmod -R ug+rwX $my_root/opt/$my_name
find $my_root/opt/$my_name -type d -exec $sudo_cmd chmod ug+s {} \; find $my_root/opt/$my_name -type d -exec $sudo_cmd chmod ug+s {} \;