I’m new to Truenas Scale but ran Freenas for a long time as a light user. I need a little help unzipping (rar) on the server itself. I used to use unrar with (I think) a link setup and run from command line in my old system. I’m hoping someone has instructions somewhere how to get this setup to automatically unrar/unzip after download. I’m not sure how to go about installing 7z or similar and get it up and running.
It’s my understanding the install of 7z or similar will not survive an upgrade of the OS.
Thanks for any help or anywhere you can point me? I’ve searched a lot and couldn’t find much . One thread complaining that 7z didn’t come installed but nothing with a full setup.
Voted!
Ideally automatically would be great, but I was doing it manually for years before. I’ll take what I can get as long as I don’t have to pull it down to my local machine just to unzip and put it right back up.
That might not work with Docker at the moment. (I don’t believe you can access the host’s filesystem from an application that exists as a container.) And it would be unwise to expose the host’s entire filesystem to a container.
With a “Linux jail / sandbox”, it’s theoretically possible, in the same way it can be done with a FreeBSD jail.
To do it manually (in the meantime), you can download a portable version of 7zip and “install” it on a storage dataset, then add the binary (7zzs) location to your user’s $PATH. You can optionally create an “alias” of 7z to reference the binary 7zzs.
Thanks for your quick response. I will try the manual option. I’ll have to do a bit of research to figure out exactly what you mean, but I think you’ve given me enough to get going. Thanks!
I found that my app user had 7z installed in usr/bin already without me doing anything. I suppose it’s possible it got installed with another app. However I can’t get 7z to extract rar files. I’m using:
7z e -r [Folder containing archives I want to extract]
This doesn’t seem to work. Am I missing something?
Extracting archive: myArchive.rar
ERROR: myArchive.rar
Cannot open the file as archive
“That’s going to dump all the files directly into your current working directory. I’d advise against that.”
correct, just testing and I’m ok with it being extracted there.
I also tried extracting from a folder above using -r flag with the same issue.
Have you installed Multi-Report?
I know there was a request for 7zip to be added to SCALE, but I don’t know if it was. As far as I know you could be running a nightly that has 7zip. If that is the case and you feel it is faulty, report it.
SCALE 24.04 and later are locked down pretty hard. We can get past that but I only recommend that for someone who assumes the risk and will not badmouth TrueNAS if they screw up. Examine Multi-Report script if you want the trick.
Version: TrueNAS-SCALE-24.04.2
I Don’t think I installed Multi-Report. Definately not through the CLI, but I have clicked on NetData in the reporting section if that did it.
As for listing what’s in the archive, I get the same error: Cannot open the file as archive. I’ve verified I can open the file locally if I pull it down. I should note, this is a split rar archive so there are .r01, .r02 etc.
Also note that 7z is installed for the Apps user: 568. and that’s who I am shelling with.