dokuwiki:upgrade_dokuwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dokuwiki:upgrade_dokuwiki [2020/03/08 18:26] – 192.168.1.69 | dokuwiki:upgrade_dokuwiki [2025/04/29 13:19] (current) – [Re-enable security settings for Dokuwiki] peter | ||
---|---|---|---|
Line 7: | Line 7: | ||
</ | </ | ||
- | This will create the **dokuwiki-backup.tar.gz** backup. | + | <WRAP info> |
+ | **NOTE: | ||
+ | |||
+ | Alternatively, | ||
+ | cd /var/www | ||
+ | cp -R dokuwiki dokuwiki-20250429 | ||
+ | </ | ||
+ | |||
+ | </ | ||
---- | ---- | ||
Line 25: | Line 34: | ||
wget http:// | wget http:// | ||
</ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** The latest stable version can usually be downloaded. | ||
+ | |||
+ | <code bash> | ||
+ | cd ~ | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | Sometimes the stable version may be corrupt and does not extract okay. | ||
+ | |||
+ | * In this case try to download a specified version. | ||
+ | * Visit https:// | ||
+ | * And then get the actual version needed: | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 44: | Line 73: | ||
</ | </ | ||
- | The quotes on cp assure that it will run as is, even if an alias is set. | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set permissions for the updated files ===== | ||
+ | |||
+ | <code bash> | ||
+ | cd /var/www | ||
+ | chown -R www-data: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Re-enable security settings for Dokuwiki ===== | ||
+ | |||
+ | Change directory to the Dokuwiki config directory. | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | </ | ||
+ | |||
+ | Edit the Dokuwiki config file, and set the **useacl** option to a 1. | ||
+ | |||
+ | <file bash / | ||
+ | ... | ||
+ | |||
+ | /* Authentication Settings */ | ||
+ | $conf[' | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Restart NginX ===== | ||
+ | |||
+ | <code bash> | ||
+ | systemctl restart nginx.service | ||
+ | </ | ||
---- | ---- | ||
Line 54: | Line 124: | ||
if(function_exists(' | if(function_exists(' | ||
- | | + | |
- | $uid = posix_geteuid(); | + | $uid = posix_geteuid(); |
- | $usr = posix_getpwuid($uid); | + | $usr = posix_getpwuid($uid); |
- | $user = $usr[' | + | $user = $usr[' |
- | $gid = posix_getegid(); | + | $gid = posix_getegid(); |
- | $grp = posix_getgrgid($gid); | + | $grp = posix_getgrgid($gid); |
- | $group = $grp[' | + | $group = $grp[' |
}else{ | }else{ | ||
- | | + | |
- | $tmp = tempnam ('/ | + | $tmp = tempnam ('/ |
- | $uid = fileowner($tmp); | + | $uid = fileowner($tmp); |
- | $gid = filegroup($tmp); | + | $gid = filegroup($tmp); |
- | | + | |
- | $out = `ls -l $tmp`; | + | $out = `ls -l $tmp`; |
- | $lst = explode(' | + | $lst = explode(' |
- | $user = $lst[2]; | + | $user = $lst[2]; |
- | $group = $lst[3]; | + | $group = $lst[3]; |
- | unlink($tmp); | + | unlink($tmp); |
} | } | ||
echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; | echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; | ||
</ | </ | ||
+ | |||
+ | |||
+ | Here are the most commonly used values for setting permissions on directories and files. | ||
+ | |||
+ | ^directories^files^result^ | ||
+ | |0700|0600|read/ | ||
+ | |0770|0660|read/ | ||
+ | |0777|0666|read/ | ||
dokuwiki/upgrade_dokuwiki.1583691980.txt.gz · Last modified: 2020/07/15 09:30 (external edit)