Question
· Dec 2, 2019

Operation System Permission

Hi all...

I am try to execute a class method from JDBC connection. My method are simple, just create a file at $HOME  like this:

 

set sc='$zf(-1,"touch $HOME/lixo.txt > /var/tmp/log666 2>&1")

I put a log file to this commnad because it's don't work, and in log file i get this:

touch: cannot touch ‘/root/lixo.txt’: Permission denied


after to try other commands I found that user and enviromnent  variables are diferents:
I try this:

set sc='$zf(-1,"echo $USER > /var/tmp/log666 2>&1") ;Return root

 

set sc='$zf(-1,"echo $HOME > /var/tmp/log666 2>&1") ;return /root

 

set sc='$zf(-1,"whoami > /var/tmp/log666 2>&1") ; return cacheusr

I need help to write a file at $HOME using a JDBC connection in Cache 2017

 

w $zversion
Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.1 (Build 801U) Wed Dec 6 2017 09:23:15 EST
Discussion (8)0
Log in or sign up to continue