tar zcpfv dokuwiki-backup.tar.gz /path/to/dokuwiki
NOTE: This will create the dokuwiki-backup.tar.gz backup.
Read the changelog to see if there are any special things to consider
Download the newest release from the download site.
cd ~ wget http://.../dokuwiki-xxxx-xx-xx.tgz
tar zxvf dokuwiki-xxxx-xx-xx.tgz
Make sure to overwrite all files when prompted.
'cp' -af dokuwiki-xxxx-xx-xx/* /path/to/dokuwiki/
NOTE: The quotes on cp assure that it will run as is, even if an alias is set.
<?php if(function_exists('posix_geteuid')){ // use posix to get current uid and gid $uid = posix_geteuid(); $usr = posix_getpwuid($uid); $user = $usr['name']; $gid = posix_getegid(); $grp = posix_getgrgid($gid); $group = $grp['name']; }else{ // try to create a file and read it's ids $tmp = tempnam ('/tmp', 'check'); $uid = fileowner($tmp); $gid = filegroup($tmp); // try to run ls on it $out = `ls -l $tmp`; $lst = explode(' ',$out); $user = $lst[2]; $group = $lst[3]; unlink($tmp); } 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/write for owner only. Owner must be the same as the PHP process user. |
0770 | 0660 | read/write for owner and group. The PHP process user needs to be in the user group |
0777 | 0666 | read/write for everyone. Dangerous because everybody with access to the server may write and delete your files. Use only as a last resort on trusted machines, NOT on a cheap shared hosting server. |
grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vf
Upgrade your template and plugins if necessary.