usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.61k stars 616 forks source link

Filemanager UI cache issues with permissions #506

Open meramsey opened 3 years ago

meramsey commented 3 years ago

Environment: Latest 2.0.3 Cyberpanel on Ubuntu 20

Problems.

  1. Is that when you right click a file and change the permissions and save and then select another file to edit permissions it shows the same permissions of the previous file you selected and changed and not the current file's permissions. closing it and refreshing files from filemanager does not clear this. Neither does refreshing the page. The only way to clear this is to shift refresh to hard clear/refresh browser cache. This gives the impression that the file has incorrect permissions when opening it if it does not match what it should be. Possibly related too symptoms from: https://github.com/usmannasir/cyberpanel/issues/468
  2. Changing permissions like you would via chmod is not possible via octal value like 644/755 as the numbers are not editable and only the checkboxes are considered as input.
  3. When opening a file it should show the files current permissions not a cached value or empty value if no previous permissions were done like in issue 1 mentioned above.

Proposed fixes.

  1. Always load the current file's permissions when change permissions is opened and the values shown should match whats in the filemanager and a manual stat of the file.
  2. Setting an octal aka chmod value should be possible. If possible the appropriate checkboxes should also be toggled based on octal value input.

Screenshots:

First opened file permissions shows empty. first_opened_file_via_changed_permissions_empty_permissions

Changing permissions on that file: changed_permissions

Opening permissions on another file after changing permissions on the above results in hard cached permissions from previous action. opened_file_permissions_shown_invalid

usmannasir commented 3 years ago

let me take a look.