sassoftware / loguccino

Scan and patch tool for CVE-2021-44228 and related log4j concerns.
Apache License 2.0
34 stars 5 forks source link

Operation Not permitted #9

Closed NuriaU closed 2 years ago

NuriaU commented 2 years ago

I’m traying to fix the log4j vulnerability in Viya 3.5 environment on Linux. It only found one jar, however when I run it to fix it, I get the error: Error while patching : java.nio.file.FileSystemException: ./loguccino-patch-27122021120042/inventoryOriginals/0/opt/sas/viya/home/libexec/cachelocator-service-1.25.14.jar: Operation not permitted

I have been running both with the user who owns the jar and with the installer user but in both cases the error is the same.

Should the patch be run with a specific user?

saschu6106 commented 2 years ago

The patch needs to be run as the sas user. There are also umask settings needed.
See https://go.documentation.sas.com/doc/en/log4j/1.0/p1pymcg1f06injn10rho5mkmmhe4.htm.

Also, make sure the location where you are writing the output of the patch command has write access by the sas user.

You can run scan as the installer it. But patch must be run as the sas user (sudo su - sas).

boomskats commented 2 years ago

@NuriaU I remember encountering a similar issue & having to stop the cachelocator service before the patch operation could make changes to the .jar.

If that doesn't fix it, could you have a look at the most recent loguccino-XXX.log file and post any relevant info you find in there?

boomskats commented 2 years ago

This is inactive so I'm closing it. @NuriaU feel free to reopen it if you still have the same problem.