File Manager ZIP save problem

Hi,

I checked the virtualmin -> Webmin Modules -> File Manager and tried to select a directory and click on the save button. It asked me to save the directory and download it in which format ( tar.gz , zip , … ) and then I selected the ZIP and here is the error occurred after the selection :

Failed to create archive : zip I/O error: Permission denied

zip error: Could not create output file (/tmp/.webmin/301884_1_show.cgi)

also I tried different type of archive file ( including tar.gz and … ) and all have the same problem.
Can you please check and advise ?

_Hamid

Do you have a /tmp directory? Does it have free space? Does the user you’re logged in as have permission to write to /tmp? /tmp is supposed to be writable by all, but some “hardening” scripts do stupid things to /tmp.

Joe,

This one was so quick :slight_smile:
I have /tmp like this (I believe everyone should have /tmp) :
drwxrwxrwt 8 root root 4096 Aug 16 22:46 tmp

and as you can see the permission in world writable. The thing is that in /tmp there is a .webmin directory like this :
drwxr-xr-x 2 root root 12288 Aug 16 13:08 .webmin

as you can see it is only root writable ! As I didn’t create this directory and it is non of my bussiness I didn’t change anything in that. If you think that there should be world write access for this directory please let me know and fix the default template in webmin to create a world writable directory at the first time.

P.S. I have huge of space left there in /tmp

_Hamid

Sounds like Webmin might be behaving badly. That directory probably shouldn’t be world-writable…but Webmin ought to know when it needs to do something as root.

I’ll ask Jamie to chime in here with his thoughts.

Yes, this is a Webmin bug - it is trying to save the temporary zip file in the /tmp/.webmin directory, to which the domain owner doesn’t have permissions to write. I will fix this in the next Webmin release (1.370).