File manager failed on editing files

I have the wrong end of the topic again I guess

No, I did not switch user. As my reply indicated that I logged in as lampadm1, then created the text test file (the file owner is lampadm1), then trying to edit it, then hit the error. I am in lampadm1 all the time.

the primary virtualmin user is lampadm1. root was used for configuration changes when a function or utility unavailable to lampadm1

Hi Adams: could we have a screenshare session on this? Thanks

temp or tmp? Your screenshot appears to show the latter

temp or tmp?

@angstrom,

Forgive my ignorance as I haven’t read this thread completely…

But perhaps the editor you are referring to is referencing a “relative” path for the current domain selected.

If you could a provide remote login for me (PM credentials) to have a closer look, it would help. I cannot repro this issue!

Hi Llia:

we could have a screensharing session for this trouble shooting. I can create a meeting invite for you if you provide me your email address, via Teams.

Thanks
Harry Li

Hello, Harry.

Unfortunately, I am not able to provide screen-sharing session. However, if you provide login credentials and steps to reproduce an issue, I may login and have a look when I have a free moment.

Hi Llia:

I will provide the virtual meeting link at your free time if you could give me a time slot. without the virtual meeting, accessing our internal url is not possible from outside of our network.

today after logging in as lampadm1, I did the followings in “File Manager”:

  1. changed the permission on file /home/lampadm1/test-editor from 644 to 744 via the “property” gui
  2. “view” works fine on that file
  3. “edit” displayed an error “no such file or directory. (on top test-editor (/tmp))”

my point is that the permission is not the root-cause of this issue.

I had another account lampadm, which does not have this “edit” problem, but it gave an error “No domains are available for this account. Use the hosting control panel to add a domain before installing an application” when trying to install “WordPress” via Installatron.

lampadm was created under the domain applampp03.tmh.tmhs.

lampadm1 was created when lampadm1 domain was created.

both applampp03.tmh.tmhs and lampadm1 are top domains

Can you tell more about this user? Is this sudo-capable user? Or is this a safe-user created in Webmin Users module?

Or was this user setup manually or was it setup by Virtualmin? So you’re logged in as this user (virtual server owner mode), right? How does /etc/webmin/filemin/lampadm1.acl file look like?

  1. changed the permission on file /home/lampadm1/test-editor from 644 to 744 via the “property” gui
  2. “view” works fine on that file
  3. “edit” displayed an error “no such file or directory. (on top test-editor (/tmp))”

I cannot reproduce it. It works for me most definitely in all modes!

lampadm1 was created by VirtualMin when we created lampadm1 domain.

lampadm1.acl contains “noconfig=1”

That doesn’t look standard. The default Virtualmin-created File Manager user ACL file should contain:

noconfig=1
work_as_user=lampadm1        # should be an actual Unix user
allowed_paths=/home/lampadm1 # should be an actual Unix user home
work_as_root=0

Thanks Llia for the quick response.

can I add those params to lampadm1.acl on-the-fly? do I need to restart virtualmin service to make it effective?

under /etc/webmin/filemin/, I saw lampadm1.acl, but not lampadm.acl. should every account has its own acl file? I mentioned lampadm that was created by OS admin, and it does not have this “edit - cannot allocate the file or directory” problem

You shouldn’t really edit those files manually unless you really know what you’re doing.

A better solution is to make Virtualmin regenerate those files by first disabling Webmin login enabled feature in Edit Virtual Server page and then re-enabling it.

I have 12 domains and only 8 .acl files, so not sure how that works.
P.S. Ignore, I just saw the webmin login bit.

Hey Llia:

after logging in as root and selected ‘lampadm1’, in “Edit Virtual Server”, unchecking “Webmin Login enabled”, clicked “Save Vitual Server”. lampadm1.acl was removed as following:
02:26 PM root@hhvapplampp03:~ # ll /etc/webmin/filemin/
total 16
-rw-------. 1 root bin 20 Jan 31 18:14 config
-rw------- 1 root root 11 Feb 28 17:45 hhvapplampp03.acl
-rw-r–r-- 1 root root 1200 Feb 23 14:04 prefs.lampadm1
-rw-r–r-- 1 root root 21 Mar 22 10:17 test.txt

after re-enable it on lampadm1, it re-appeared at /etc/webmin/filemin/, but its content was not changed: 02:27 PM root@hhvapplampp03:~ # cat /etc/webmin/filemin/lampadm1.acl
noconfig=1
02:27 PM root@hhvapplampp03:~ #

should I do these steps in lampadm1 account? Thanks

Sorry, I’ve just checked the code and I don’t see how File Manager ACLs file would be generated like this. Perhaps, there is a broken Virtualmin domain config file located in /etc/webmin/virtual-server/domains directory?

You can try manually fixing this to something like:

should I do these steps in lampadm1 account?

What do you mean by this? Which account was it?