Site with root access level.

Spyros

Member
Jul 1, 2014
16
0
1
Athens, Greece, Greece
cPanel Access Level
Root Administrator
Hi all,

We have cpanel to host our clients sites, furthermore, we host some internal pages for statistics, for cpanel create acount delete subdomains, delete server folders etc. We implemented that with cron jobs because that sites has no access to exec aplications out of their account.

the implementation of this is something like that: i deside to delete a folder, from our internal site we choose it and with php we set in database that this folder will be delete. after another script with root privileges run from cron check the database see the changes and know that it must delete the folder.

How can give in a site root access level so it can delete a folder?

I know for security issues of that but we cover them and we need this for many functions.

Regards,

Savvanis Spyros
 

cPanelMichael

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

What type of directory are you attempting to delete with account level access? For instance, is it a directory within the account or outside of the account's home directory?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You should implement those cron jobs from the "root" level if you want to delete directories that only the "root" user will have access to. For example, from SSH as "root", run this command:

Code:
crontab -e
Thank you.
 

Spyros

Member
Jul 1, 2014
16
0
1
Athens, Greece, Greece
cPanel Access Level
Root Administrator
Hi michael,

You misunderstood me , we all ready implemented this with cronjobs from root account. from a web page interface we setup a db for what to exec and a cron script check the db and exec what is needed.

But we now need speed, we cant wait for cron to check even if the cron running every minute. so for that one page of our hosting we need to have root privileges ( we are aware for the danger), can we implemented that via cpanel?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
It seems like an overall bad implementation of a script if you need to grant root access to an account for it to function correctly. Could you elaborate a little more on how this script works so that we can offer some alternatives?

Thank you.