[GH-ISSUE #753] $global_readonly not working #514

Closed
opened 2026-03-02 15:59:22 +03:00 by kerem · 6 comments
Owner

Originally created by @kc9ryt on GitHub (Mar 19, 2022).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/753

Hello,
I am running v. 2.4.7 and $global_readonly = true does not seem to be working with auth turned off.

Originally created by @kc9ryt on GitHub (Mar 19, 2022). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/753 Hello, I am running v. 2.4.7 and $global_readonly = true does not seem to be working with auth turned off.
kerem closed this issue 2026-03-02 15:59:22 +03:00
Author
Owner

@prasathmani commented on GitHub (Mar 20, 2022):

@kc9ryt , check this #583

<!-- gh-comment-id:1073186860 --> @prasathmani commented on GitHub (Mar 20, 2022): @kc9ryt , check this #583
Author
Owner

@shadowvfx commented on GitHub (Mar 22, 2022):

Full disclosure, I'm an idiot. I followed the link to issue 583 and I don't understand what it's getting at. Why doesn't setting global_readonly to true make it....read only? I am not a PHP expert, but I want to share a collection of files with a local club and I want them to be able to access the file directories, but NOT have any kind of editing privileges. I would prefer not needing a guest login or any login screen. Simply go to the directory and it will show a list of all files for browsing. I just want them to view the documents and download. All the file management stuff I can handle via FTP.

<!-- gh-comment-id:1075391231 --> @shadowvfx commented on GitHub (Mar 22, 2022): Full disclosure, I'm an idiot. I followed the link to issue 583 and I don't understand what it's getting at. Why doesn't setting global_readonly to true make it....read only? I am not a PHP expert, but I want to share a collection of files with a local club and I want them to be able to access the file directories, but NOT have any kind of editing privileges. I would prefer not needing a guest login or any login screen. Simply go to the directory and it will show a list of all files for browsing. I just want them to view the documents and download. All the file management stuff I can handle via FTP.
Author
Owner

@alex-reach commented on GitHub (Jun 24, 2022):

This in not working for me either @prasathmani . Or are we doing something wrong?

<!-- gh-comment-id:1165575565 --> @alex-reach commented on GitHub (Jun 24, 2022): This in not working for me either @prasathmani . Or are we doing something wrong?
Author
Owner

@mrlawrencelam commented on GitHub (Jul 20, 2022):

Yes, this feature is seriously missing.

I want only the Administrator to be able to manage files (requires login).

But for public users, don't need to log in. They can go directly to the file list but can't edit/delete/upload files.

I tried pointing to the link tinymanager.php?fm_usr=user&fm_pwd=user123 but this doesn't work.

How can public users bypass the login form?

<!-- gh-comment-id:1190720068 --> @mrlawrencelam commented on GitHub (Jul 20, 2022): Yes, this feature is seriously missing. I want only the Administrator to be able to manage files (requires login). But for public users, don't need to log in. They can go directly to the file list but can't edit/delete/upload files. I tried pointing to the link tinymanager.php?fm_usr=user&fm_pwd=user123 but this doesn't work. How can public users bypass the login form?
Author
Owner

@andymcca commented on GitHub (Sep 29, 2022):

$global_readonly isn't currently referenced anywhere in the PHP file apart from the initial definition.

To get this to work I think you just need to change the definition of FM_READONLY in line 396 to the following -

define('FM_READONLY', ($use_auth && !empty($readonly_users) && isset($_SESSION[FM_SESSION_ID]['logged']) && in_array($_SESSION[FM_SESSION_ID]['logged'], $readonly_users)) || $global_readonly);

<!-- gh-comment-id:1262110249 --> @andymcca commented on GitHub (Sep 29, 2022): $global_readonly isn't currently referenced anywhere in the PHP file apart from the initial definition. To get this to work I think you just need to change the definition of FM_READONLY in line 396 to the following - define('FM_READONLY', ($use_auth && !empty($readonly_users) && isset($_SESSION[FM_SESSION_ID]['logged']) && in_array($_SESSION[FM_SESSION_ID]['logged'], $readonly_users)) || $global_readonly);
Author
Owner

@prasathmani commented on GitHub (Nov 19, 2022):

This issue is addressed in the new release.

<!-- gh-comment-id:1320959157 --> @prasathmani commented on GitHub (Nov 19, 2022): This issue is addressed in the new [release](https://github.com/prasathmani/tinyfilemanager/releases/tag/2.5.0).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#514
No description provided.