tecwithquestion

Well-Known Member
Oct 20, 2014
65
2
58
cPanel Access Level
Root Administrator
Hello

I have noticed that user who have jail shell access , he can access 80% of server data.

and this is very risky.

Is there any way to prevent this ? or is there any way to copy all users commands execuated via jailshell to safe location so that he can not clear those ?

in bash history it gets saved but user can remove / clear those entries
 

MilesWeb

Well-Known Member
PartnerNOC
May 23, 2012
173
2
68
India
cPanel Access Level
Root Administrator
Twitter
Hello

I have noticed that user who have jail shell access , he can access 80% of server data.

and this is very risky.

Is there any way to prevent this ? or is there any way to copy all users commands execuated via jailshell to safe location so that he can not clear those ?

in bash history it gets saved but user can remove / clear those entries
Which files can be read with the jail shell access ? Could you confirm which files can be modified which are outside his account ?
 

MilesWeb

Well-Known Member
PartnerNOC
May 23, 2012
173
2
68
India
cPanel Access Level
Root Administrator
Twitter
many folders of servers
Yes, you should be able to view them. However, if these folders have actual data, you won't have access to it. Kindly provide with any such folder under which you can view the files and read them.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

This is standard due to the nature of how the filesystem works on Linux. Note that while you may be able to view some directories outside of /home, all account-specific data should be restricted. Additional documentation is available at:

VirtFS (Jailed Shell)

Thank you.
 

tecwithquestion

Well-Known Member
Oct 20, 2014
65
2
58
cPanel Access Level
Root Administrator
Okay. I will look for it. how can I get the jailshell lock for user for which jailshell is enabled.

can I make copy of his history file somewhere on server ?

home/user/.bash.history is not good file. He can clean that file (if he is having good exp on linux)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
You can copy the .bash_history file through a cron job as mentioned in the thread from my previous post.

Thank you.