0046.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Web Based File Management with PHP and Tiny File Manager</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  7. <script type="text/javascript">
  8. $(function(){
  9. $('textarea').each(function(i,e){
  10. theTextarea = $(this);
  11. theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
  12. });
  13. $('li').each(function(i,e){
  14. var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
  15. $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
  16. $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
  17. });
  18. $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
  19. theElement = $(this);
  20. var lines = theElement.html().split("\n");
  21. theElement.empty();
  22. for(l=0;l<lines.length;l++){
  23. if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
  24. theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ lines[l].replace(/"/g, '&quot;') +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
  25. } else {
  26. theElement.append(lines[l]);
  27. }
  28. }
  29. });
  30. $(document).on('click','input.copy-text',function(){
  31. theButton = $(this);
  32. $('input.copy-text').attr('src','images/clipboard.png');
  33. $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
  34. try {
  35. if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
  36. $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
  37. } else {
  38. $('#'+ theButton.attr('rel')).addClass('copy-animation');
  39. }
  40. navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
  41. theButton.attr('src','images/clipboard_active.png');
  42. } catch(err) {
  43. }
  44. return false;
  45. });
  46. $(document).on('click','input.completeBox',function(){
  47. theBox = $(this);
  48. $('#'+ theBox.attr('rel')).addClass('strikethrough');
  49. theBox.prop('disabled',true);
  50. theBox.parent('li').prevAll().each(function(i,e){
  51. theLI = $(this);
  52. if(theLI.find('input[type=checkbox]').not(':checked')){
  53. $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
  54. theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
  55. }
  56. });
  57. });
  58. if(window.self !== window.top){
  59. window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
  60. }
  61. });
  62. </script>
  63. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  64. </head>
  65. <body>
  66. <div id="gridContainer">
  67. <div class="topMargin"></div>
  68. <div id="listName" class="topMargin">
  69. <h1>Web Based File Management with PHP and Tiny File Manager</h1>
  70. </div>
  71. <div></div>
  72. <div id="content">
  73. <h2>Download and Setup Tiny File Manager</h2>
  74. <ol>
  75. <li>Download Tiny File Manager <a href="https://github.com/prasathmani/tinyfilemanager/releases" target="_blank">Download</a></li>
  76. <li>Extract the Tiny File Manager files</li>
  77. <li>Copy TinyFileManager.php to Apache install directory/htdocs/filemanager</li>
  78. <li>Rename TinyFileManager.php to index.php</li>
  79. <li>Edit index.php in a text editor</li>
  80. <li>Find $use_auth and set the value to false</li>
  81. <li>Save</li>
  82. <li>Open a web browser and navigate to https://DNSorIP/filemanager</li>
  83. </ol>
  84. <h2>Customizing Root Location and Authentication</h2>
  85. <ol>
  86. <li>Optionally, Edit Apache install directory/htdocs/filemanager/index.php</li>
  87. <li>Find $root_path and edit the value to limit the scope of the file manager</li>
  88. <li>Save index.php</li>
  89. <li>Navigate to the Apache install directory/conf in Explorer</li>
  90. <li>Edit httpd.conf in a text editor</li>
  91. <li>Find the authnz_ldap_module and make sure it is enabled by removing the # at the start of the line
  92. <p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so</p>
  93. </li>
  94. <li>Find the ldap_module and make sure it is enabled by removing the # at the start of the line
  95. <p>LoadModule ldap_module modules/mod_ldap.so</p>
  96. </li>
  97. <li>Create a Location block to enable LDAP authentication for the specified directory
  98. <p>&lt;location /filemanager&gt;<br />
  99. # Basic authentication with LDAP against MS AD<br />
  100. AuthType Basic<br />
  101. AuthBasicProvider ldap<br />
  102. <br />
  103. # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
  104. # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
  105. AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE</p>
  106. <p> # The LDAP bind username and password<br />
  107. AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
  108. AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
  109. LDAPReferrals Off<br />
  110. AuthUserFile /dev/null<br />
  111. <br />
  112. AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
  113. # to authenticate a domain group, specify the full DN<br />
  114. AuthLDAPGroupAttributeIsDN on<br />
  115. require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local<br />
  116. &lt;/location&gt;</p>
  117. </li>
  118. <li>Save httpd.conf</li>
  119. <li>Restart the Apache service</li>
  120. <li>Refresh https://DNSorIP/filemanager</li>
  121. </ol>
  122. </div>
  123. </div>
  124. </body>
  125. </html>