Tiki Installation Permission Check

Installation Problems?

check required filesystem permissions for your webserver

This page should always be visible, independent from any installation problems with Tiki. If the Tiki installer does not run properly, this effect may be caused by some permission problems (some problems may be caused by webserver settings regarding htaccess or PHP settings regarding memory limit). There are many different use cases, thus there is no default permission setting which works in all cases and provides an appropriate security level.

PHP check:

\n"; if ($permission_granted == "yes\n") { echo 'https://doc.tiki.org/Permission+Check' . $html_and_ascii_linebreak ; echo $html_and_ascii_linebreak ; echo 'disable permission check on production machines' . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; echo 'disable permission by running' . $html_and_ascii_linebreak; echo 'sh prepare_permissioncheck.sh disable' . $html_and_ascii_linebreak; echo "in Tiki's document root" . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; echo 'or (not recommended) disable permission (setting: no) by copying file' . $html_and_ascii_linebreak; echo 'permissioncheck/no.bin' . $html_and_ascii_linebreak; echo 'to file' . $html_and_ascii_linebreak; echo 'permissioncheck/permission_granted.bin' . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; } else { echo 'permission not granted' . $html_and_ascii_linebreak ; echo $html_and_ascii_linebreak ; echo 'enable permission by running' . $html_and_ascii_linebreak; echo 'sh prepare_permissioncheck.sh enable' . $html_and_ascii_linebreak; echo "in Tiki's document root" . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; echo 'or (not recommended) enable permission (setting: yes) by copying file' . $html_and_ascii_linebreak; echo 'permissioncheck/yes.bin' . $html_and_ascii_linebreak; echo 'to file' . $html_and_ascii_linebreak; echo 'permissioncheck/permission_granted.bin' . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; echo 'Do not edit those files - different line ending conventions (Mac,Unix,Windows) matter' . $html_and_ascii_linebreak; echo $html_and_ascii_linebreak ; echo 'https://doc.tiki.org/Permission+Check' . $html_and_ascii_linebreak ; echo $html_and_ascii_linebreak ; echo 'disable permission check on production machines' . $html_and_ascii_linebreak; echo '

' . $ascii_linebreak; echo '

permissioncheck

' . $ascii_linebreak; echo '

' . $ascii_linebreak; echo ' Enjoy Tiki and' . $ascii_linebreak; echo ' join the community!' . $ascii_linebreak; echo '

' . $ascii_linebreak; echo ''; die; } ?>

permission check: ' . $filename . '' . ' owned by '; echo "\n\tuser " . '' . $username . '' . ' and group ' . '' . $groupname . '' . ' has got access permissions '; echo "\n\t" . $perms_asc . '' . ' which is ' . '' . $perms_oct . '' . ' octal.'; echo $html_and_ascii_linebreak; ?>

Please ensure correct permission settings of this permission test suite. You may modify permissions either by SSH access or by FTP access. The first column (italic) shows assumed permissions (what they should be to run this test), next is user (owner), group (owner), actual permissions ascii and octal) and the subdirectory or filename which was checked.

Permissions where "is" equals "should" are green, deviations are red. If permission setting is correctly enabled but "is" shows 999 your webserver won't work with that model. There's no access to username, groupname or permission setting. All other versions of check.php may be checked. Choose the most restrictive model for security reasons. Webservers with SuPHP enabled are known to restrict write permissions, but make sure that you don't expose confidential information by sloppy read permissions.

'; $html_empty_table_row = '' . "\n "; echo '' . '' . '' . '' . ''; echo '' . '' . ''; foreach ($uc_perms_subdir as $usecase => $perms_subdir) { $perms_file = $uc_perms_file[$usecase]; echo $html_empty_table_row; // subdir $filename = $usecase; get_perm_data($filename, $username, $groupname, $perms_asc, $perms_oct); if ($perms_subdir == $perms_oct) { $css_class = "equal"; } else { $css_class = "notequal"; } color_classes_perm_asc($filename, $perms_asc, $css_class_writable); echo '' . '' . ''; echo ''; echo '\n "; // file $filename = $usecase . "/" . $default_file_name; get_perm_data($filename, $username, $groupname, $perms_asc, $perms_oct); if ($perms_file == $perms_oct) { $css_class = "equal"; } else { $css_class = "notequal"; } // if ( is_writable($filename) ) { // $css_class_writable = 'writeyes'; // } else { // $css_class_writable = 'writeno'; // } // $css_class_writable = 'noclass'; color_classes_perm_asc($filename, $perms_asc, $css_class_writable); echo '' . '' . ''; echo ''; echo '\n "; // include this file as external one via HTTP request echo $html_almost_empty_table_row; echo ''."\n "; echo '' . "\n "; } // general data for special checks $perms_unknown = '???'; $css_class_unknown = 'unknown'; $css_class_user = 'user'; echo $html_empty_table_row ; // special: // php safe mode: check for /tmp $tmpfile = '/tmp'; $filename = $tmpfile; $perms_file = $perms_unknown; $css_class = $css_class_unknown; get_perm_data($filename, $username, $groupname, $perms_asc, $perms_oct); // if ( is_writable($filename) ) { // $css_class_writable = 'writeyes'; // } else { // $css_class_writable = 'writeno'; // } color_classes_perm_asc($filename, $perms_asc, $css_class_writable); echo '' . ''; echo '' . "\n "; // // $nosuchfile='/example_does_not_exist'; $usersubmittedfile = isset($_POST['usersubmittedfile']) ? $_POST['usersubmittedfile'] : ''; //$checkfile = $_POST['checkfile']; if ($usersubmittedfile == "") { $dummy = "foo"; } else { $first_character = substr($usersubmittedfile, 0, 1); if ($first_character == '/') { //$path_prefix = '/'; $path_prefix = ''; $display_name = $usersubmittedfile; } else { $path_prefix = '../'; $tmp_url = get_page_url_clean($usersubmittedfile); $display_name = '' . $tmp_url . ''; } //$filename = '../' . $usersubmittedfile; $filename = $path_prefix . $usersubmittedfile; $perms_file = $perms_unknown; $css_class = $css_class_user; get_perm_data($filename, $username, $groupname, $perms_asc, $perms_oct); // if ( is_writable($filename) ) { // $css_class_writable = 'writeyes'; // } else { // $css_class_writable = 'writeno'; // } color_classes_perm_asc($filename, $perms_asc, $css_class_writable); echo '' . ''; //echo '' . "\n "; echo '' . "\n "; } ?>
 
 
shouldusergroupascii and
colored PHP
permissions'; echo '
read:yes/no'; echo '
write:yes/no
octalfilename
' . $perms_subdir . '' . $username . '' . $groupname . '' . $perms_asc . '' . $perms_oct . 'permissioncheck/' . $filename . "
' . $perms_file . '' . $username . '' . $groupname . '' . $perms_asc . '' . $perms_oct . 'permissioncheck/' . $filename . "
'; // $check_if_model_works = false; // include $filename; // if ( $check_if_model_works ) { // $check_if_model_works_text = 'Read: this model works for you'; // } else { // $check_if_model_works_text = 'Read: this model does not work for you!'; // } $url_name = get_page_url($filename); //print $url_name; $http_request = 'foo'; $http_request = @file_get_contents($url_name); if ($http_request === false) { $http_output = '' . 'THIS DOES NOT WORK' . ''; } elseif ((strpos($http_request, 'arning') == true) or (strpos($http_request, 'rror') == true)) { $http_output = '' . 'THIS DOES NOT WORK' . ''; } else { $http_output = '' . $http_request . ''; } //print file_get_contents($url_name) or print 'THIS DOES NOT WORK'; echo $http_output; //echo $check_if_model_works_text; //echo $check_if_model_works_text . '
' . $perms_file . '' . $username . '' . $groupname . '' . $perms_asc . '' . $perms_oct . '' . $filename . '
' . $perms_file . '' . $username . '' . $groupname . '' . $perms_asc . '' . $perms_oct . '' . $usersubmittedfile . '
' . $perms_asc . '' . $perms_oct . '' . $display_name . '
 

permissioncheck

create new_htaccess

Enjoy Tiki and join the community!