diff options
author | M.Gergo | 2018-07-06 11:13:06 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-06 11:13:06 +0200 |
commit | 50310b0e4513ee3fcce67351ae61e8fff851130e (patch) | |
tree | fd2e4a73f94a61cd5040f863579149ed97c701a3 /mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh | |
parent | 630f5353ed7a264b0fa17badd62f71a02265a4f7 (diff) | |
download | mayor-50310b0e4513ee3fcce67351ae61e8fff851130e.tar.gz mayor-50310b0e4513ee3fcce67351ae61e8fff851130e.zip |
Mappák átnevezve: mayor --> mayor-mod; mayor-installer --> mayor-installer-mod; mayor-installer-fcgi --> mayor-installer-fcgi-mod
Diffstat (limited to 'mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh')
-rwxr-xr-x | mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh b/mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh new file mode 100755 index 00000000..1e090128 --- /dev/null +++ b/mayor-installer-fcgi-mod/fcgi_install.d/90chown.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +echo -e "A könyvtárak jogosultságainak beállítása\n\n" +read -n 1 -p "beállíthatom? (i/N)" -s DO +if [ "$DO" != "i" ]; then echo -e "\nNem.\n"; exit 1; fi + + +if [ $MAYORUSER == "" ] || [ $MAYORDIR == "" ]; then echo -e "A MAYOR(DIR/USER) változó üres! .....kilépek\n" ; exit 1 ; fi + +chown -R "$MAYORUSER:$MAYORUSER" /home/$MAYORUSER/ ## Ez esetben a MAYORDIR a /home/xxx/mayor-ra mutat + +find /home/$MAYORUSER/ -type f -print0 | xargs -0 chmod 0644 +find /home/$MAYORUSER/ -type d -print0 | xargs -0 chmod 0751 +find /home/$MAYORUSER/ -name '*.php' -print0 | xargs -0 chmod 0640 +find /home/$MAYORUSER/mayor/ -name '*.sh' -print0 | xargs -0 chmod 0600 +find /home/$MAYORUSER/mayor/bin/ -name '*.sh' -print0 | xargs -0 chown root:root +find /home/$MAYORUSER/mayor/ -name '*.conf' -print0 | xargs -0 chmod 0600 + +# a csomagoló jogainak visszaállítása +chmod -R 600 "/home/$MAYORUSER/mayor/www-bin/" +chmod +x "/home/$MAYORUSER/mayor/www-bin/php7.fcgi" + +## de azért idemásolom az eredetit is, biztos-ami-biztos +chmod 700 $MAYORDIR/config/ +# A main.conf védelme +chown root:root $MAYORDIR/config/main.conf +chmod 600 $MAYORDIR/config/main.conf + + +echo -e "...kész.\n"
\ No newline at end of file |