I extracted the archive to my windows desktop and then re-7zip and I still had the same problem.
I did not make the original archive, this came from my clients hosting provider and I assume it was created on the Linux machine where the files are present.
Hmm, that makes it sound like the opposite. That 7z doesn’t preserve permissions. Which is bonkers. It’s not a format I ever use (it’s inferior to several newer compression formats, that are faster and more efficient), so I don’t know how it behaves, but I searched yesterday and got the impression it did store permissions.
Of course not. It runs the program to perform the operation. We didn’t reimplement 7z (or zip or gzip or bz2 or xz or whatever), we just run the command to do the thing, and I guess this is what it spits out? Do you get something different when you uncompress it using the command line tool as the same user?
So, maybe do not use 7-zip for backup purposes on Linux/UNIX. Just a thought.
I definitely wont. I will look around on the internet ans see if anyone else has identified this permission issue. For now, i will just extract and then zip up before transferring to my Virtualmin and extracting it there.
Some people put it in a tar file and then compress that with 7Zip so as to keep permissions.
when i extracted a zip i got 0644 and 0755 and that is what I expected. These are the default permissions for CGI, FastCGI and suExec environments I think.
It might be that 7z was around from before suExec and it is still using permissions from that error.
remember this ? Unpacking with 7z messes up permissions for resulting files. - General Support - Unraid ? It states that file permissions are not restored, this doesn’t make any difference if the archive was restored from a gui or the command line … 7z does not store this in the archive. Just a quick chmod/chown fixes it, as Joe pointed out don’t use this format of archive on anything critical. Zip on the other hand appears to respect file permissions
Since we have nothing to do with the problem and you can set permissions in the File Manager after extraction, I’ll call this one solved. I don’t think we should try to guess what the user wants with regard to permissions as that’d be very dangerous.