Skip to content
Snippets Groups Projects
Select Git revision
  • 022340af1682a56319bdddd04bbc02eade9ccf81
  • main default
  • 35-cgu
  • 34-peertube-support
  • 27-add-autoplay-to-iframe
  • 33-bug-on-youtube-embed-urls
  • RC-Rekall-v1.1-fix_lpo
  • tuleap-140-go-back-to-my-capsules-page-when-i-m-on-capsule-preview-page
  • RC-Rekall-v1.2-fix10
  • RC-Rekall-v1.2-fix9
  • RC-Rekall-v1.2-fix8
  • RC-Rekall-v1.2-fix7
  • RC-Rekall-v1.2-fix6
  • RC-Rekall-v1.2-fix5
  • RC-Rekall-v1.2-fix4
  • RC-Rekall-v1.2-fix3
  • RC-Rekall-v1.2-fix2
  • RC-Rekall-v1.2-fix1
  • RC-Rekall-v1.1-fix-3
  • RC-Rekall-v1.1-fix-2
  • RC-Rekall-v1.1-fix-1
  • RC-Rekall-v1.1-delivered
  • preprod20220209-1535
23 results

phpstan.neon

Blame
  • nextcloudStrongDirectoryPermissions.sh 2.22 KiB
    #!/bin/bash
    
    # Copyright (C) 2017  Tetras Libre <admin@tetras-libre.fr>
    # Author: Curt, Sebastien <Sebastien.Curt@tetras-libre.fr>
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    # from  https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html?highlight=trusted#trusted-domains
    NEXTCLOUD_INSTALL_DIR=${NEXTCLOUD_INSTALL_DIR:-'/var/www/nextcloud'}
    htuser=${htuser:-'www-data'}
    htgroup=${htgroup:-'www-data'}
    rootuser=${rootuser:-'root'}
    datapath=${datapath:-'/home/nextcloud'}
    
    echo "nextcloudStringDirectoryPermission"
    
    printf "Creating possible missing Directories\n"
    if [ ! -d ${datapath%/} ]
    then
        mkdir -p ${datapath%/}
    fi
    
    printf "chmod Files and Directories\n"
    find ${NEXTCLOUD_INSTALL_DIR%/}/ -type f -print0 | xargs -0 chmod 0640
    find ${NEXTCLOUD_INSTALL_DIR%/}/ -type d -print0 | xargs -0 chmod 0750
    
    printf "chown oc Directories\n"
    chown -R ${rootuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/
    chown -R ${htuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/apps/
    #chown -R ${htuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/apps2/
    chown -R ${htuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/config/
    chown -R ${htuser}:${htgroup} ${datapath%/}/
    chown -R ${htuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/themes/
    
    chmod +x ${NEXTCLOUD_INSTALL_DIR%/}/occ
    
    printf "chmod/chown .htaccess\n"
    if [ -f ${NEXTCLOUD_INSTALL_DIR%/}/.htaccess ]
    then
        chmod 0644 ${NEXTCLOUD_INSTALL_DIR%/}/.htaccess
        chown ${rootuser}:${htgroup} ${NEXTCLOUD_INSTALL_DIR%/}/.htaccess
    fi
    if [ -f ${datapath}/.htaccess ]
    then
        chmod 0644 ${datapath}/.htaccess
        chown ${rootuser}:${htgroup} ${datapath%/}/.htaccess
    fi
    
    echo "nextcloudStringDirectoryPermission : terminated"