Which folder should contain my bash scripts

genesearch

Registered
Oct 13, 2016
4
1
3
AU
cPanel Access Level
Root Administrator
I am using a VPS host, with Cpanel/WHM so I have full control.
On one of the hosting accounts, which is a live website, I have created some bash scripts to run some admin tasks at set times using cron.

The Help desk at the provider is insisting I should have these scripts located in the /public-html folder, and I think they are nuts, but they wont listen to me.

They said that I can secure the script locations, but thats not the point. If I make a human error and expose my scripts to the internet it can cause me problems. By putting my scripts into the home/ folder, then there is zero risk.

Who is right, them or me?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello,

Could you provide more information about what the bash script does? Is it purely for account-specific tasks or does it require the manipulation or use of system-level files that only the "root" user has access to?

Thank you.
 

genesearch

Registered
Oct 13, 2016
4
1
3
AU
cPanel Access Level
Root Administrator
Hello,

Could you provide more information about what the bash script does?
Thanks

account specific tasks, which is why I place the bash script in the relevant home directory. i have a few different ones but one is for emailing a log file and then delete that file.

No action on system files and no root required