prasathmani / tinyfilemanager

Single-file PHP file manager, browser and manage your files efficiently and easily with tinyfilemanager
https://tinyfilemanager.github.io
GNU General Public License v3.0
4.61k stars 1.63k forks source link

Ownership and permission for root folder #1169

Closed thomaslvz closed 1 month ago

thomaslvz commented 1 month ago

Hi all, I have read a lot of issues here and it is not clear to me, so I make a new one

My root path is set to : $root_path = $_SERVER['DOCUMENT_ROOT'].'files';

and i want to know what ownership and permission settings should be granted for my folder files. It is currently set to

drw-rw---- tinyfilemanager www-data

But this doesnt work, and I dont want to set it to 777 (even though this makes it work) to keep things clean.

hestiacn commented 1 month ago

Just in the root directory of your web page. There is no point in setting this up. Please refer to: chmod 644 /home/admin/web/Example.com/public_html

thomaslvz commented 1 month ago

Thanks for answering. What you say does not seem right to me. My web page is within /var/www/tinyfilemanager, my root directory is set to /var/www/tinyfilemanager/files. If I do chmod -R 644 /var/www/tinyfilemanager/files my files are not visible from my web browser. I did chmod -R 755 /var/www/tinyfilemanager/files , this seems to work now

hestiacn commented 1 month ago

In fact, /tinyfilemanager can be set to lindex.php and it can become the default access file by directly opening the domain name.