diff options
author | ramon <ramongomez@us.es> | 2017-03-14 12:40:11 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-03-14 12:40:11 +0000 |
commit | 663cd90576a70f36ad3e7902570c465eba455933 (patch) | |
tree | 2053152f6ef9bea2580547d207bb795cf62b1f70 | |
parent | 6f4d39baf193d0418f59cfb786f6aa2e08475936 (diff) |
#730: Actaulizador no cambiar permisos, usa script {{{checkperms}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5232 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | installer/opengnsys_update.sh | 21 | ||||
-rwxr-xr-x | server/bin/checkperms | 2 |
2 files changed, 4 insertions, 19 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 9cf98094..4ca53347 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -559,9 +559,6 @@ function updateWebFiles() done cp -a $COMPATDIR/imagenes.device.php $COMPATDIR/imagenes.device4.php - # Cambiar permisos para ficheros especiales. - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/images/{fotos,iconos} - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/tmp/ # Fichero de logs del agente OGAgent. touch $INSTALL_TARGET/log/ogagent.log chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/log/ogagent.log @@ -584,9 +581,6 @@ function updateInterfaceAdm() echoAndLog "${FUNCNAME}(): error while updating admin interface" exit 1 fi - chmod -R +x $INSTALL_TARGET/client/interfaceAdm - chown $OPENGNSYS_CLIENTUSER:$OPENGNSYS_CLIENTUSER $INSTALL_TARGET/client/interfaceAdm/CambiarAcceso - chmod 700 $INSTALL_TARGET/client/interfaceAdm/CambiarAcceso echoAndLog "${FUNCNAME}(): Admin interface updated successfully." } @@ -603,7 +597,6 @@ function makeDoxygenFiles() rm -fr "$INSTALL_TARGET/www/api" mv "$INSTALL_TARGET/www/html" "$INSTALL_TARGET/www/api" rm -fr $INSTALL_TARGET/www/{man,perlmod,rtf} - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/api echoAndLog "${FUNCNAME}(): Doxygen web files created successfully." } @@ -625,11 +618,12 @@ function createDirs() [ -d $dir ] && ln -fs $dir ${INSTALL_TARGET}/tftpboot done fi - mkdir -p ${INSTALL_TARGET}/tftpboot/menu.lst + mkdir -p $INSTALL_TARGET/tftpboot/menu.lst/examples if [ $? -ne 0 ]; then errorAndLog "${FUNCNAME}(): error while creating dirs. Do you have write permissions?" return 1 fi + ! [ -f $INSTALL_TARGET/tftpboot/menu.lst/templates/00unknown ] && mv $INSTALL_TARGET/tftpboot/menu.lst/templates/* $INSTALL_TARGET/tftpboot/menu.lst/examples # Crear usuario ficticio. if id -u $OPENGNSYS_CLIENTUSER &>/dev/null; then @@ -643,17 +637,6 @@ function createDirs() fi fi - # Establecer los permisos básicos. - echoAndLog "${FUNCNAME}(): setting directory permissions" - chmod -R 775 $INSTALL_TARGET/{log/clients,images,tftpboot/menu.lst} - mkdir -p $INSTALL_TARGET/tftpboot/menu.lst/examples - ! [ -f $INSTALL_TARGET/tftpboot/menu.lst/templates/00unknown ] && mv $INSTALL_TARGET/tftpboot/menu.lst/templates/* $INSTALL_TARGET/tftpboot/menu.lst/examples - chown -R :$OPENGNSYS_CLIENTUSER $INSTALL_TARGET/{log/clients,images,tftpboot/menu.lst} - if [ $? -ne 0 ]; then - errorAndLog "${FUNCNAME}(): error while setting permissions" - return 1 - fi - # Mover el fichero de registro al directorio de logs. echoAndLog "${FUNCNAME}(): moving update log file" mv $LOG_FILE $OGLOGFILE && LOG_FILE=$OGLOGFILE diff --git a/server/bin/checkperms b/server/bin/checkperms index 97379004..917e6391 100755 --- a/server/bin/checkperms +++ b/server/bin/checkperms @@ -51,8 +51,10 @@ chown root:$APACHE_GROUP $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.c chmod 640 $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg} chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/images/{fotos,iconos} chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/api +chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/tmp # ??? chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/tftpboot/menu.lst chown -R :$OPENGNSYS_USER $OPENGNSYS_DIR/tftpboot/ogclient find -L $OPENGNSYS_DIR/tftpboot -type d -exec chmod 755 {} \; find -L $OPENGNSYS_DIR/tftpboot -type f -exec chmod 644 {} \; +chown $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/log/ogagent.log |