You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "Setup:Installation Guide/Security Settings/File System Permissions"
< Setup:Installation Guide | Security SettingsReturn to history page
← Setup:Installation Guide/Security Settings/File System Permissions
← Setup:Installation Guide/Security Settings/File System Permissions
[unchecked revision] | [quality revision] |
(Tag: 2017 source edit) |
/tmp/bshtmldiff/helpdesk_en-hw_/1576.html (Datei oder Verzeichnis nicht gefunden)
/tmp/bshtmldiff/helpdesk_en-hw_/1576.wiki (Datei oder Verzeichnis nicht gefunden)
(13 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
− | For trouble-free usage of your BlueSpice installation<span class="">, the web server requires write permissions to several folders of the file system.</span> <span class="">However, it is recommended to keep the rights for all other files and folders to a minimum.</span> <span class="">This document shows you the relevant folders and the | + | For trouble-free usage of your BlueSpice installation<span class="">, the web server requires write permissions to several folders of the file system.</span> <span class="">However, it is recommended to keep the rights for all other files and folders to a minimum.</span> <span class="">This document shows you the relevant folders and the correct permissions setting.</span> |
==Tips for this Document== | ==Tips for this Document== | ||
− | * Please, read this manual completely and work through the single | + | * Please, read this manual completely and work through the single installation steps one after another. |
− | * | + | * For editing the configuration files with a text editor, the files must be saved in UTF-8 coding without BOM (Byte Order Mark). |
− | * The | + | * The placeholder <code></code> stands for the path to your BlueSpice installation, e.g <code>C:\inetpub\wwwroot\bluespice</code> (Windows) or <code>/var/www/bluespice</code> (Linux). |
− | == | + | ==Affected Folders== |
− | The folders, which require write permissions, are: | + | The folders, which require write permissions, are: |
* <code><installpath-bluespice></code>/cache | * <code><installpath-bluespice></code>/cache | ||
Line 17: | Line 17: | ||
* <code><installpath-bluespice></code>/extensions/BlueSpiceFoundation/config | * <code><installpath-bluespice></code>/extensions/BlueSpiceFoundation/config | ||
* <code><installpath-bluespice></code>/extensions/BlueSpiceFoundation/data | * <code><installpath-bluespice></code>/extensions/BlueSpiceFoundation/data | ||
− | * <code><installpath-bluespice></code>/extensions/Widgets/compiled_templates '''( | + | * <code><installpath-bluespice></code>/extensions/Widgets/compiled_templates '''(only BlueSpice pro)''' |
==Assignment of Permissions with Windows== | ==Assignment of Permissions with Windows== | ||
Line 25: | Line 25: | ||
==Assignment of Permissions with Linux== | ==Assignment of Permissions with Linux== | ||
− | Here you can assign rights much more strictly, which is also recommended. Transfer the | + | Here you can assign rights much more strictly, which is also recommended. Transfer the directory <code><installpath-bluespice></code> recursively to the user root (CHMOD for Files 644, CHMOD for Directories 755) and after this, transfer the mentioned directory recursively to the user and the group, under which the Apache Web Server runs (Debian/Ubuntu e.g. "www-data"). |
In the following, we provide a bash script, which works through this tasks for you with only one command. | In the following, we provide a bash script, which works through this tasks for you with only one command. | ||
− | To do so, create the file /usr/local/bin/ | + | To do so, create the file /usr/local/bin/setWikiPerm and copy the following code into this file: |
<pre>#!/bin/bash | <pre>#!/bin/bash | ||
Line 35: | Line 35: | ||
WWW_USER="www-data" | WWW_USER="www-data" | ||
WWW_GROUP="www-data" | WWW_GROUP="www-data" | ||
+ | |||
+ | WWW_HOME=`eval echo ~$WWW_USER` | ||
+ | WWW_CFG=$WWW_HOME/.config | ||
if [ $# -eq 0 ]; then | if [ $# -eq 0 ]; then | ||
− | + | echo "You must enter the path of your MediaWiki installation." | |
− | + | exit | |
elif [ ! -d $1 ]; then | elif [ ! -d $1 ]; then | ||
− | + | echo "$1 does not exist or is no path." | |
+ | exit | ||
+ | fi | ||
+ | |||
+ | if [ ! -f $1/LocalSettings.php ]; then | ||
+ | echo "$1 contains no Localsettings.php" | ||
exit | exit | ||
fi | fi | ||
+ | |||
PATH=`echo "$1" | sed -e 's#/$##'` | PATH=`echo "$1" | sed -e 's#/$##'` | ||
Line 52: | Line 61: | ||
pathes=( | pathes=( | ||
− | + | "$PATH/cache" \ | |
− | + | "$PATH/images" \ | |
− | + | "$PATH/_sf_archive" \ | |
− | + | "$PATH/_sf_instances" \ | |
− | + | "$PATH/extensions/BlueSpiceFoundation/data" \ | |
+ | "$PATH/extensions/BlueSpiceFoundation/config" \ | ||
+ | "$PATH/extensions/Widgets/compiled_templates" \ | ||
) | ) | ||
for i in "${pathes[@]}"; do | for i in "${pathes[@]}"; do | ||
− | + | if [ -d $i ]; then | |
− | + | /bin/chown -R $WWW_USER:$WWW_GROUP $i | |
− | + | fi | |
done | done | ||
+ | |||
+ | if [ ! -d $WWW_CFG ]; then | ||
+ | /bin/mkdir $WWW_CFG | ||
+ | fi | ||
+ | |||
+ | /bin/chown -R $WWW_USER:$WWW_GROUP $WWW_CFG | ||
+ | |||
+ | /usr/bin/find $PATH/extensions -iname 'create_pygmentize_bundle' -exec /bin/chmod +x {} \; | ||
+ | /usr/bin/find $PATH/extensions -iname 'pygmentize' -exec /bin/chmod +x {} \; | ||
+ | /usr/bin/find $PATH/extensions -name 'lua' -type f -exec /bin/chmod 755 {} \; | ||
+ | |||
</pre> | </pre> | ||
− | If needed, replace the content of the | + | If needed, replace the content of the variables |
WWW_USER="www-data" | WWW_USER="www-data" | ||
Line 73: | Line 95: | ||
with the approprate user and group of your distribution. | with the approprate user and group of your distribution. | ||
− | After this, assign CHMOD 755 to this file. Now you can run the script and let it do the complete permission setting automatically with the following command: | + | After this, assign CHMOD 755 to this file. Now you can run the script and let it do the complete permission setting automatically with the following command: |
+ | |||
+ | setWikiPerm <code><installpath-bluespice></code> | ||
+ | |||
+ | {{Hint | ||
+ | |text=<b>Note that when the update.php is executed on the console, the rights can be partially discarded. For this reason, set the rights to "update.php" again.</b> | ||
+ | }} | ||
− | |||
− | [[ | + | [[en:{{FULLPAGENAME}}]][[de:Setup:Installationsanleitung/Sicherheitseinstellungen/Dateisystemrechte]] |