2 suggestions

This is used for general discussion that is not necessarily server-related.
Post Reply
Brewskii187
A semi-regular
A semi-regular
Posts: 22
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Mar 07, 2013 1:59 pm

2 suggestions

Post by Brewskii187 »

I would like to see a notes tab in the control panel. were we can keep passwords and other notes. Also have it shareable with the Panel Access tab.

Another suggestion, for web servers, would be to dump the results of the cron jobs into a folder name 'cron' in the users home directory instead on dumping all the results in the home directory itself, reason being is if you run a cron job every 15 min those damn files add up quickly and i have to keep SSHing into the webserver to clear them out.


Thanks!
NineteenEleven.
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: 2 suggestions

Post by Edge100x »

The cron daemon just starts its execution in the home folder for the user. It doesn't generate its own files, so you must have an application that is doing this. You should be able to reconfigure your application to use a different location for its output; you could also launch it from a different directory by having the crontab line change directories first, or wrapping it in a script that changes the directory.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: 2 suggestions

Post by soja »

+1 for a notes tab for packages. We had to create a new root pass for out vds, some Chinese ip must've cracked the auto generated one the day we had it up! Cpanel has caught about 50 brute force attempts since we got Cpanel installed. I made my own ip whitelist with the firewall tab, but whm still uses root to log in.

I would like to be able to write notes down in the tab like complex ssh passwords etc.
Not a NFO employee
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: 2 suggestions

Post by Edge100x »

It's ridiculously unlikely that someone brute-forced the default password :).
Brewskii187
A semi-regular
A semi-regular
Posts: 22
Joined: Thu Mar 07, 2013 1:59 pm

Re: 2 suggestions

Post by Brewskii187 »

Brewskii187 wrote:I would like to see a notes tab in the control panel. were we can keep passwords and other notes. Also have it shareable with the Panel Access tab.

Another suggestion, for web servers, would be to dump the results of the cron jobs into a folder name 'cron' in the users home directory instead on dumping all the results in the home directory itself, reason being is if you run a cron job every 15 min those damn files add up quickly and i have to keep SSHing into the webserver to clear them out.


Thanks!
NineteenEleven.

I set my cron tabs in the NFO cpanel, here is an example of one

*/15 * * * * wget "http://kablowsion.com/gameadmins/buildCache.php"

Image



I probably should have been more specific. its only when using wget. cron jobs that specifically call a process dont do it. like mysql. I dont have anything in my scripts that dump the results to that directory. The script does however output a result when viewed in the browser, but the files outputed to the webserver are empty.


@soja One of my vps' got compromised once, NFO firewall is a savior.
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: 2 suggestions

Post by Edge100x »

wget is an example of an application that will output to a file in the current directory -- it saves the file that you're downloading. If you don't actually want a file saved, consider deleting it after the wget run, or using "curl" instead of "wget".
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: 2 suggestions

Post by Spray »

Have you considered using the PHP interface on the command line? Unless your script specifically calls for output, this should also work:

Code: Select all

*/15 * * * *  php /path/to/file/buildCache.php
Alternatively, if you need to use the cache files for a set amount of time before cleaning them up, you can schedule another cron that removes old files. For instance, this would clean up any files older than 7 days matching buildCache.php.[somestring]:

Code: Select all

find -name "buildCache.php.*" -mtime +7 -exec rm {} \;
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: 2 suggestions

Post by soja »

Edge100x wrote:It's ridiculously unlikely that someone brute-forced the default password :).
You're probably right, but man cpanel must attract a lot of attackers. Before I firewalled port 22 I must've gotten 75 emails in one night from brute force attempts.
Not a NFO employee
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: 2 suggestions

Post by Edge100x »

We see brute-force attacks on all machines. They're very common, sadly. I do recommend firewalling off random internet hosts from RDP and SSH -- especially RDP, since login attempts cause Windows machines to spike in CPU usage.
Post Reply