File manager failed on editing files

SYSTEM INFORMATION
OS type and version REQUIRED RHEL8.7
Webmin version REQUIRED 2.013
Virtualmin version REQUIRED 7.5 Pro
Related packages SUGGESTED

when clicking “edit” in the menu of right-click a text file, file-manager showed an error “no such file or directory”, as if file-manager editor does not look at the correct pathes to the file.

logging as root does not have this issue.

try a reboot, hard refresh of page (ctl-shft-R) and clear browser cache.

@hmwebservices,

Post a screenshot, so we can better help you.

After rebooting the system, the problem persists.

Screenshot of file when clicking “View”, this works fine.

Screenshot of error when clicking “Edit”.

I can’t reproduce this problem on my machines. @Ilia do you know why/how this could happen? Notice the path is /public_html on the edit screenshot, while it’s /home/<domain>/public_html in the view screenshot. So, maybe something chroot related?

@hmwebservices does this user have a chrooted shell?

Screenshot of lampadm1 account in passwd file

Files are able to be edited on /, but receive an error when in a subdirectory.
error reads: Cannot find file or directory.

Can we create a link at /public_html to target /home/lampadm1/public_html ?

Have you tried another browser? I use Firefox for general browsing and keep it locked down so tight it breaks a lot of sites.

You could, but why on earth would you do that!?

Are you using current stable versions of everything? (i.e. you haven’t forced installation of a dev version of Authentic Theme, or something?)

We probably just need to wait for Ilia to chime in.

We’ll await for Ilia’s response.
Thank you for your prompt reply.

I don’t have much to add, as it works for me in virtual server owner login mode, with and without enabled jail.

@hmwebservices Does reloading the page fixes the problem for you? If not, can you provide the steps to reproduce the problem or a remote login for me to see the problem myself?

I’m probably missing something, but why isn’t license.txt in the same exact location in both screenshots?

I would suggest clearing the browser cache and disabling all plugins (for testing), and see if behavior changes.

@vending_makina,

This thread is about the File Manager built into Webmin/Virtualmin. There are no plugins to disable.

1 Like

@tpnsolutions,
I meant the web browser’s plugins, as the screenshot shows some icons in the toolbar…

@vending_makina,

Gotcha, though the term “plugins” hasn’t been used in quite some times, heh heh

1 Like

It’s showing full path for root user probably. I logged in as a server owner. One directory up I get the ~/ Just the /public_html one level below. Same as OP sees.

Is the site up and running or is this causing a problem setting it up? It looks like the correct owner on the files but that’s at least partially hidden. Wrong error, but might explain why root can open them.

There’s your answer. It’s not the file manager. You have a permissions issue. Have you put any sort of restrictions on your default server templates?

This is not a permission issue.

logged in as lampadm1, created a file /home/lampadm1/temp/test-editor, as following screenshot shows:

when editing it, I go the same error as " no such file or directory" as this screenshot:

unlike the viewer, the editor from virtualmin did not look in the directory /home/lampadm1/temp, instead, it looked at /temp, where there is no text-editor file

1 Like

Are you switching users when you do this? In other words, did you create the file as root and then try to find it with the user account? Or vice versa?

Or were you root the entire time?