Failed to create temp directory /tmp filemin virtualmin

i have recently have integrated whmcs with virtualmin and one of the problems it's that i get this error when i try to use the file manager form the new created virtualserver

Failed to create temp directory /tmp2-1218-xasdxdco : uid= mode=

tmp2 it's my personalized webmin tmp directory that I have to create to allog big account to be crated (a bug tha may have to change in the future)

this error doesn't happend on regular created virtual servers

Status: 
Needs review

Comments

Where did you configure this custom temp directory?

on webmin configuration in Advanced Options

Okay, just to clarify, what is the value set for your custom Webmin directory? Is it "/tmp2-1218-xasdxdco"?

today i have upgraded the theme for webmin and seems that they have corrected the issue... Authentic theme version 19.23-beta1 thanks anyway have a nice day

Status:
Fixed
»
Needs review

it was a false positive... the error still exist when I accessed was from root user accessing from customer side the problem still exist...

Failed to create temp directory /tmp2-1223-inetmees : uid= mode=

Can you share a screenshot of what your Advanced Settings screen looks like in Webmin?

Also, what is the output of this command:

ls -ld /tmp2

ok, but i think the problem its for definition of the new temp forlder that must to be a subfolder of tmp2 and as i see now its trying to generate a root folder on the server that an account haven't got enough permissions....

drwxr-xr-x 2 root root 16384 ene 9 10:28 /tmp2

You should make /tmp2 world-writable like /tmp is, so that non-root users can create files in it.

i have chmod 777 /tmp2 whith the same resoult when trying to use file manager from user created automatic from whmcs connection (i think i havent told you this detail)

Failed to create temp directory /tmp2-1222-estersco : uid= mode=

as I see the problem its the deffinition of the use of tmp folder the temp directory mus to be in subfolder /tmp2/1222-esterco (inside folder) what the script its trying to do its write into root path /tmp2-1222-estersco outside /tmp2 directory

Yeah, the trouble is it normally does attempt to make it within the folder. What we're trying to do is figure out why that isn't working as expected in this case.

I'm not seeing a screenshot of the Webmin Advanced Settings screen... if you had attempted to attach that, could you try that again? As I'm not sure it worked as expected.

i have upload the screenshot... please review the script that asign the tmp folder on virtualserver creation that there must be a mistake

You should set the path to something like /tmp2/.webmin instead.

ok, now its working :-D the slash whas the problem... but now the starting path for this templated based virtual server explorer are wrong, they are only allowed to go in something like this /home/chroot/154695460825132 where can i thange de default path for the explorer in the template ??

We're glad to hear that's working now, thanks for letting us know how you fixed it!

It sounds like you're seeing a new issue as well, that appears to be unrelated to the original issue.

We're happy to help! Though if you're seeing a new issue, it'd be best if you could open a new support request for that. Thanks!

it was just putting the slash at the end of directory path.... ok i will open a new issue but its just to know where i can config the path for file explorer in webmin / virtualmin becouse when start working it don't give the /home/virtualserver that it must to be

False positive... :(

The problem persists on webmin access Failed to create temp directory /tmp2/-1222-estersco : uid= mode=

File manager only works on usermin access

What are the permissions on /tmp2 ? They should be the same as on /tmp

Try setting the temp directory to /tmp2/.webmin

same resoult Failed to create temp directory /tmp2/. webmin/-1220-wwwwwes :

new directory . webmin permissions set 777

I had discover today that it's not a user problem using file manager as root and trying to download a folder i have exactly the same problem hope this may help

Just to clarify, are you logged into Webmin as root when doing this, or as a virtual server domain owner?

Something is preventing the creation of sub-directories under /tmp2 , which is very confusing because root should have permissions to create directories anywhere.

I think to debug this further we'd need remote access to your system.

I have enabled remote Login right now

I don't seem to be able to remotely access your server -- can you confirm your IP address and SSH port? Thanks!

the external access its enabled, can you access?

Okay, I'm logged into your server, and when I went to use the file manager, I'm not seeing any problems or errors.

I tried it both using the "File manager" link in one of your Virtual Servers, as well as going into Webmin and accessing it there.

Can you walk us through the exact steps we can use to reproduce the issue?

As i told you the problem on root user it' s on using the download option on a folder

Failed to create temp directory /tmp2/.webmin/-1151-netme : uid= mode=

this it's the same problem that happen when an non root user try to use the filemin

I'm unfortunately not receiving that error when using the "Download" option on a folder.

When logged into Virtualmin on your server, I'm able to use the Filemanager and download folders with the "Download" option.

Can you provide us a specific example of a folder that you're unable to download?

We're trying trying to replicate the exact issue you're seeing.

log intomytheclub.com virtualmin server from the dropdown... for example then go to file manager and try to download a folder

Okay, I selected mytheclub.com from the dropdown, and then was able to download a folder from there... i downloaded the "stats" folder.

Jamie, do you have any idea why that issue could be occurring for them, but not for us?

i am conected as root and i am getting the error on stats folder Failed to create temp directory /tmp2/.webmin/-1095-mytheclu : uid= mode=

the problem persist for them i am now worried about getting the error it's becouse i allow the to access to webmin and they can't use file manager on webmin with the same error this it's a shampla access to a user to webmin

https://0bda2d74-43bc-4555-93e4-10e9b8e13122.clouding.host:10000 user =xasdxdco pass =866px2JbzE

i am thinking it could be a problem of the url thant you access to webmin... you havent got problems on accesing trough the IP... i am accessing throug subdomain...

same problem over ip access... :/

Yup, I understand... let's see what Jamie has to say on that and we'll work from there.

He will likely respond a bit later today.

Jamie, do you have any idea why that issue could be occurring for them, but not for us?

the link and the icon are differents when you enter as root path=%2Fhome%2Fmytheclu%2Fpublic%5Fhtml then when enter as user /filemin/index.cgi?path=%2Fpublic%5Fhtml

Understood... hold off on additional comments until Jamie is able to respond, or else he'll never see this question :-)

Jamie will have an idea as to what's going on, and will hopefully be able to respond later today.

Jamie, do you have any idea why that issue could be occurring for them, but not for us?

The only thing I can think of is whether you're logging into Webmin as root, or as a domain owner.

the main problem exist when domain owner enter on webmin... but as i said it also happend to me as root when use download download option on a /home/domain/public_html

any posible solution? there its a lot of time whit this....

This isn't an issue that comes up for most users, and has proven tricky to track down. We'd like to resolve it, but you might in the meantime just need to have your user download the folder using FTP or SFTP.

Jamie, while I'm not seeing this issue as the root user, I did in fact run into it while logged in as the Virtual Server owner.

It occurs for me the moment I click the "File Manager" button.

Oh, I wonder if this is because of a chroot jail. Do you have jailing setup for this domain's user?

i have look up if there were any connection whith the activation of jailbreak whith this problem, i think the only place where you activate it it's on the template (?) how can i know or disable for a simple virtualserver the jailbreak?

You can enable this at Administration Options -> Edit Owner Limits -> Other restrictions.

i can see it unchecked so there it's not a jail enabled maibe i have to turn back to tmp default folder but it give me a lot of troubles with importing big backups... you have noticed?

Yeah, certain backups could indeed cause a problem if /tmp is on a partition that's not large enough to hold the unpacked backup.

These days, most users have /tmp as part of the main partition, so that isn't something we see too often, though we do have folks who run into that space issue from time to time (and that's one of the main reasons for offering a different /tmp path).

However, we haven't received any other reports about problems opening the file manager in that case, so we're still working to figure out what that issue is.

i had tried to selectively modify the tmp directory on advanced options for file manager module with same resoults /tmp -> error /var/tmp ->error /tmp2 -> error on download archive

could i also weigh in on this issue...my 2 systems are debian 9 VPS and not centos.

on my older virtulamin server on GCC i experience the exact same error when i log into usermin as the server owner and click on file manager. On my new virtualmin server on Vultr (installed just a few days ago) i do not experience this problem when i log into usermin and click on file manager.

The old server on GCC does not have jail enabled, the new server on vultr does does have the jail enabled.

Also, on the "new" webmin/virtualmin server, when the virtualmin>virtual server owner logs in to usermin and clicks on file manager, he can see the home directory owned by root:root. The users own directory is also owned root:root.

I dont understand how this can be...this is what virtualmin did itself when i created the virtual server from virtualmin...i didnt do it manually. One point i would like to add, i was logged into webmin/virtualmin as root when i created the virtual servers i have on it whereas on the old server i created another aministrative user in webmin and essentially gave the same/similar level of access. Does this have anything to do with this problem?

I cant check this on the older server from usermin as i get the above error preventing me from even looking at the filemanager. on old GCC server

admin@server3 root]# ls -ld /tmp
drwxrwxrwt 10 root root 4096 Mar 14 09:45 /tmp
[admin@server3 tmp]# ls
systemd-private-868f8b901d6547f1b156ed4596d3ef9f-apache2.service-v1tkbx
systemd-private-868f8b901d6547f1b156ed4596d3ef9f-dovecot.service-tCvnfp
[admin@server3 tmp]# ls -ld systemd-private-868f8b901d6547f1b156ed4596d3ef9f-apache2.service-v1tkbx
drwx------ 3 root root 4096 Mar 12 16:35 systemd-private-868f8b901d6547f1b156ed4596d3ef9f-apache2.service-v1tkbx

on new server

[root@server1 ~]# ls -ld /tmp
drwxrwxrwt 11 root root 4096 Mar 13 23:09 /tmp
[root@server1 ~]# cd /tmp
[root@server1 tmp]# ls
firstboot.exec
firstboot.log
lets.csr
systemd-private-83465fee0970413b8c1336693204898a-apache2.service-mbhB1P
systemd-private-83465fee0970413b8c1336693204898a-dovecot.service-SN3pNK
[root@server1 tmp]# ls -ld systemd-private-83465fee0970413b8c1336693204898a-apache2.service-mbhB1P
drwx------ 3 root root 4096 Mar 11 04:57 systemd-private-83465fee0970413b8c1336693204898a-apache2.service-mbhB1P

finally, on my new virtualmin system on vultr, the usermin file manager virtual server owner user, is able to browse folders on the tree that they do not actually have permission to access.

This results in lots of errors..."you are not allowed to access /home/chroot....blah blah blah".

The system than hangs indefinately with the round swirly circle rotating over the selected directory in file manager. This is clearly an issue that needs urgent fix.

still waiting for a solution for this issue... it can be related with the theme used in webmin -> Authentic Theme.

could you take another look at this issue, please

at the end.... i have setup permissions to 1777 to tmp2 folder and now it works... could it be a security issue?

ups... the systema turn itself the directoy permissions to 0755 and get the error again...

Yeah, Jamie had mentioned those same permissions in Comment #11 above -- that you should set the temp directory to "1777" just like /tmp. That won't cause any problems.

It's unusual that those permissions would change though, I don't think Webmin or Virtualmin would be doing that.

How long does it take for the permissions to change back once you've set them? As one option would be to just setup a cron job to set those permissions to 1777 every so often. I know that's not ideal, but it would be a good workaround for the time being.

i didn't mesure it... but i have changed it after i send you las tessage and now had changed again to 0755 i thin it's becouse i set it won webmin advanced conf for file manager module... so this module perhaps in is making the checking permissions over the folder and changint it back to the bad permission state.... mmmm i dont think that setup a cron would be a solution for this....

i have changed and start working with file manager.... and the folder came back to default permissions in less than 10 minutes...