Web Based File Management with PHP and Tiny File Manager
#PHP #ApacheHTTPD #TinyFileManager
Full steps can be found at https://i12bretro.github.io/tutorials/0046.html
--------------------------------------------------------------------
Download and Setup Tiny File Manager
--------------------------------------------------------------------
01. Download Tiny File Manager https://github.com/prasathmani/tinyfilemanager/releases
02. Extract the Tiny File Manager files
03. Copy TinyFileManager.php to Apache install directory/htdocs/filemanager
04. Rename TinyFileManager.php to index.php
05. Edit index.php in a text editor
06. Find $use_auth and set the value to false
07. Save
08. Open a web browser and navigate to https://DNSorIP/filemanager
--------------------------------------------------------------------
Customizing Root Location and Authentication
--------------------------------------------------------------------
01. Optionally, Edit Apache install directory/htdocs/filemanager/index.php
02. Find $root_path and edit the value to limit the scope of the file manager
03. Save index.php
04. Navigate to the Apache install directory/conf in Explorer
05. Edit httpd.conf in a text editor
06. Find the authnz_ldap_module and make sure it is enabled by removing the # at the start of the line
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
07. Find the ldap_module and make sure it is enabled by removing the # at the start of the line
LoadModule ldap_module modules/mod_ldap.so
08. Create a Location block to enable LDAP authentication for the specified directory
≪location /filemanager≫
# Basic authentication with LDAP against MS AD
AuthType Basic
AuthBasicProvider ldap
# AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter
# using this format: ldap://host:port/basedn?attribute?scope?filter
AuthLDAPURL "ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)" NONE
# The LDAP bind username and password
AuthLDAPBindDN "readonly_svc@i12bretro.local"
AuthLDAPBindPassword "Read0nly!!"
LDAPReferrals Off
AuthUserFile /dev/null
AuthName "Restricted Area [i12bretro.local]"
# to authenticate a domain group, specify the full DN
AuthLDAPGroupAttributeIsDN on
require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local
≪/location≫
09. Save httpd.conf
10. Restart the Apache service
11. Refresh https://DNSorIP/filemanager
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro