i need information about this option 'Check /etc/cron.daily/logrotate for /tmp noexec workaround', there are in the server check, of the csf test, someone can explain to me about this function? should do it?
I'm needing some info i have been pulling my hair out for hours trying to get some cronjobs lined up i started out with knowing nothing about it and i'm a little better off now i got the cron running but the commands aren't executing so maybe someone can help me figure out why i would greatly appreciate it
Here's The deal I telnetted in set the following crontab ...
I have a dedicated CentOS 4.5 Server. However, as you can probably guess I am new to linux and managing a server...
Anyway, beginning of this month my crons quit working, I still receive emails as if they are ran but I can't get the scripts to actually execute.
I have not touched the crontabs or anything prior to them not working, they simply quit working... I did not notice immediatly they did not work, I am guessing that it was around the time of which I rebuilt apache to a new version of PHP. Today I tried changing them to "php path/to/script.php" and I also tried "path/to/php /path/to/script.php", neither worked.
Any ideas or suggestions as to how I can fix this?
I have a slight problem with a cron job I have setup.
I wanted to save a copy of iptables every hour to a folder, so I created a script... here it is:
Code: varDate=`date +%y%m%d` varTime=`date +%H%M`
filename="IPtablesBackup-$varDate-$varTime" iptables-save -c > /etc/IPtablesBackup/$filename and called is Backup-Script.sh
Now if I just execute the script will in root ./Backup-Script.sh I get a new file with the correct filename and iptables info is saved ! Great ! So then I thought, how can I setup this automatically every hour.
Which leads me on to my problem. I inputted "crontab -e" added this line
Code: 59 * * * * /etc/IPtablesBackup/Backup-Script.sh The problem is the script is run, I know because it creates a new file with the correct time and date, however the file is empty?
I have set Backup-Script.sh to 777 and owner and group are both root?
I did not realize the significance of the Apache sub-forum. I thought perhaps this would be a more general Server management query, but I realize now I should have posted in Apache forum.
I have been banging my head against the wall for the last couple of days trying to get cron jobs working. It's actually making me quite depressed, a lot of people are waiting on me to get this working, and for the life of me I see no light. I'm not a stupid person, i'm a PHP developer, and have some linux skills. This is the single most annoying issue I have had to deal with simply because I cannot find any troubleshooting methods to my issue.
I have tried every different combination of command under the sun and I cannot get any sign that the cron is running the commands.
I own a "virtual" dedicated server with a hosting company, I have full root access. Linux / Apache
The script file is a PHP file which simply mail() an email saying that cron is working, I am yet to receive this mail that was executed by cron.
I have ensured there are no errors in this simple PHP file, I have executed the script from the shell and all is well there..
So, firstly I tried to setup the cron table from CPanel, on the account where the script resides.
I used the following command combinations: Code: 0-59 * * * * /usr/local/bin/php /home/username/public_html/cron.php 0-59 * * * * php -q /home/username/public_html/cron.php 0-59 * * * * php /home/username/public_html/cron.php 0-59 * * * * cd "/home/username/public_html/"; php cron.php 0-59 * * * * wget [url] with time combinations of: * * * * * to get the command to be executed evey minute, for testing purposes.
All these commands work fine when executed through the shell.
I set the mail address for cron output to be my mail address also.
I do not get any mail from cpanel with an overview of the cron executions.
I then gave up trying to get cron to work on that account, and decided to go root.
I logged into the shell via root, checked the cron table for root. I edited the root cron table (that contains commands for various cpanel scripts etc) to include a command to execute the php script, even with the script residing on the root directory.
I also added MAILTO="myemail@email.com" to the first line of the cron table.
I do not get any emails of the cron actions.
How can I check if the cron scheduler is working when I get no sign that the cron commands are being executed, and when I do not receive any cron emails? What methods are there for me to troubleshoot this issue?
Could it be possible that cron shedular is not active on my server?
I have lurked the net with great detail to find any method to troubleshoot my issue, and all the related pages I find are to do with troubleshooting the commands. I know my commands are fine, there is some other issue here.
I'm having a bit of trouble with one cron job that doesn't seem to work.
I have others scripts that run hourly fine. However this one does not.
The script:
restart_monitoring.sh
Code: #!/bin/bash service iptables stop service iptables start /root/bandwidth_rules.sh /root/portforward_config.sh exit The two scripts at the end just load a lot of iptables rules back in.
The cron job should run hourly (59th minute)
The cron job entry
Code: 59 * * * * /root/restart_monitoring.sh I have restart crond to enable the new job, still doesn't run.
The job is to restart iptables, thus flushing all rules that I have running, then reloading them. I have figured out the problem to be with the "service iptables stop/start" command, it doesn't seem to like doing this...?
How do I make sure that there are cron jobs running on my cPanel server? I have root access, etc...just not sure why my crons aren't running. Nothing weird going on.
i have setup fresh Centos 6.5 with Plesk Pannel 12.0.18. When i execute the attached command from the console, i get it work, some posts are auto created within wordpress. When i enter the attached command within Plesk (Tools / Settings - Taskmanager - root New Task, the command is not executed...
This is our logrotate definition for Apache's logs folder:
Code: /var/log/httpd/*log { rotate 5 missingok notifempty size=100M sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } Yet, while it does truncate logs in five, we seem to have fairly different sizes: 182M, 168M, 968M (!)... It seems to be ignoring "size=100M",
is it possible to disable log rotate? I can't seem to find the cron under my weeklys or dailys nor monthlys unless it's named "mad-db" but is there a way to make it say yearly? or just disable it all together? I say this because the script I use has a function already to clear the logs and when log rotate runs it kills all processes going by the script
I should empty this files but i don't know if it is possible to do without reboot Apache.
a) how can i setup logrotate to rotate domlogs? And if it is possible:
b) how can i setup logrotate to rotate domlogs without restart apache?
I have already setup whm-> tweak settings to delete old domain's access logs after stats run and the whm is setup to generate statistics every 20 hours.
But every day the site is slowly because the domlogs are too big.
how to rename access logs according to Week Number?
I notice that 1&1 do this, producing a file like "access.log.31.gz". I'd like the access log to be in this format: access_log_[domain-name]_[Week-Number].gz, or if domain-name is not possible: access_log_[Week-Number].gz
Here's my current logrotate script for access_log:
I'm not exactly sure if the above is the correct syntax, but the result was that two days later my current modsec_audit.log was Gzipped and a new modsec_audit.log was created.
The problem is that nothing was logged to this new file.
From the Plesk 12 control panel I turned off mod security and then turned it back on again and hey presto, the new logfile started to log events.
This leaves the problem of why nothing was recorded when the file was created.
I have a domain with a few forwarding email accounts that forward to mac.com email accounts... for some reason every once in a while these accounts stop working...
This is the error I get when I email to that account:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: ...
I have root access to a server. Is it possible to create a cron that would restart my ftp and http server every so often. Like once a week or somthing. If so how would i do it?
i have had a problem for some time now, regarding my CRON jobs. I am trying to download a large amount of data from ebay (through their API, totally legal and aboveboard) using php, but my CRONjob times out.
I have tried resetting the timeout variable, but then it exceeds the maximum filesize SO, my question: is there any way to have a script run as a CRON job, and wen it is complete, call another script?
Hey everyone, my friend's dad is looking for a web host that will allow his cron jobs to run every second. Most hosts apparently dont allow cron jobs faster than 5 seconds apart.
How often a host can run cron jobs isn't really advertised on their sites so I'm having a bit of trouble finding a host. I've resorted to just sending emails to sales addresses asking about it.
VPS isn't rebooting by itself when it goes down. Anyone has any program/script that monitors heartbeat of the server? Like when it goes down, the program will automatically reboots the system. I know there's such a script out there but I forgot what it called.