This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

zsudo returning strings ?
#1
zsudo returning strings ?
Hello,

I've recently found these forums and sentora after looking for a new control panel, I've installed the beta and installed csf firewall on top. Everythings good, but curiosity has got the better of me and i've jumped straight into module developmement. Could anyone help me with reading files ?

This line :

$out = ctrl_system:: systemCommand('zsudo', fs_filehandler::ReadFileContents("/etc/csf/version.txt"));

It returns 0 for success rather than the contents of the file, can anyone give some clues where i'm going wrong ?

Thanks

Paul
Reply
Thanks given by:
#2
RE: zsudo returning strings ?
I won't advice you to build up a module on zsudo too much.

We are preparing a zsudo change that would restrict it's use for internal process. The purpose is tightening more the security in sentora panel.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: zsudo returning strings ?
Some ideas:
- sudo should be used only to execute action that require root access. It should not be used for anything else. It will very probably be clamped to the few commands already used or even removed completely as soon as we will swap on suExac scheme.
- if you have to access to a file from the panel, this file must be setup to have apache as owner or to be in the apache group by module installer.
- Be carefull with OS specific pathes and files : do not forget that Sentora must be able to run on Centos6 and 7, on Ubuntu 12 and 14, with 32 & 64b. (I did not found /etc/csf on my server, U14)
Reply
Thanks given by:
#4
RE: zsudo returning strings ?
Thanks,

I'm just trying to get my head around manipulating files relating to the CSF Firewall, this is installed in /etc/csf, and all files are owned by root. It works very well in a cPanel environment but would love to integrate into Sentora. As a module I'd like to add Sentora specific log files to the firewall watchlist and view any recent activity. I know it's a big ask but there must be a way of zsudu/sudo/suexec outside the Sentora environment ?

Any ideas ?
Reply
Thanks given by:
#5
RE: zsudo returning strings ?
Our focus will be to lock down sentora panel & jail zsudo commands available. That is the purpose for security reasons, in case of panel hacks or any flaw hacker won't find quick ways to elevate privileges like zsudo could offer.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 4 Guest(s)