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 am using SSL on my site but am having trouble in getting it to work correctly. I want to make it mandatory that the sections in <webaddress>/members and <webaddress>/admin are protected by SSL. I currently have the following in the httpd.conf file:
SSLEngine on SSLCertificateFile /usr/local/home/pm42/finalcert.pem SSLCertificateKeyFile /usr/local/home/pm42/privkey.pem SSLCertificateChainFile /usr/local/home/pm42/finalcert.pem
Most of the time it sends and recieves the email OK.
From time to time, the mails bounce. For example if I send to someone at Hanmail (major korean provider) then it always bounces. Similarly, sometimes people say they sent an email to the server and it bounced back to them.
I guess something is not set up right, maybe MX record or some other mysterious thing. How can I troubleshoot/solve this?
I MUST fix this so I will be back to check on this thread often,
I am looking for a replacement to my existing ISPConfig 3.x installation and have heard a lot of good things about Plesk, so I decided to put up a test server with a trial version of Plesk 12.The server is running Centos 6.5 64-bit minimal install with all system updates applied before installing Plesk. After installing Plesk I used the commands from the attached text-file.After compiling PHP 5.5.20 with no errors displayed on screen I created a new subscription plan as a copy of the #default domain" plan and changed the name to "PHP 5.5 website" and in the Hosting Parameters I changed PHP to run still run as a FastCGI application but use my compiled PHP 5.5.20 instead of the OS vendors PHP 5.3.3.The configure options used are the same as I did use for my ISPConfig 3.x servers.I also tried the configure options shown here: [URL]... But the command ends with a "configure: WARNING: unrecopgnized options: --enable-fastcgi"
If I compile with the attached script I get a HTTP 500 error when visiting the selected website (which is a clean installation of Drupal 7.34) and in the error_log for my test site I get this: " [Sun Dec 28 18:51:48 2014] [warn] [client x.x.x.x] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Dec 28 18:51:48 2014] [error] [client x.x.x.x] Premature end of script headers: index.php " x.x.x.x is the internal IP of my router/firewall.I have also looked in the Plesk Administrator GuideIs there a known issue with Plesk 12 and CentOS 6.5 64-bit when wanting to use multiple versions of PHP, since both the version compiled using the KB article above and my own attached script worked fine on my ISPConfig 3.x servers.
Microsoft Windows Server 2012 R2 12.0.18 Update #26
After the creation of a subscription, DNS does not work properly.
The last successful subcription was created Sept 26, 2014.
I thought something ontoward had happened at first so attempted to delete the subscription and re-create.
On attempting to delete the subscription the following error is given
Error: Some of the selected subscriptions were not removed. Unable to remove domain: Error during domain.com removeZone: dnsmng failed: Unknown error 0x80131509 (COM Interop Error 80131509, Description: System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Management.ManagementObject.Delete(DeleteOptions options) at System.Management.ManagementObject.Delete() at WMIMsDNS.Provider.DeleteRecordsByType(String zone, String type) at WMIMsDNS.Provider.DeleteZone(String zone, UInt32& serial)) at removeZone ZoneName = 'domain.com'Click to expand...
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 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...
It adds fine when I do: iptables -A INPUT -s 93.6.224.242 -j DROP
However, the IP is still accessing files and pages on the site according to Apache:
When I ban other IP's they are blocked from accessing anything on the server (e.g. it wouldn't even reach Apache level because of firewall), but this IP just isn't banning properly.
I installed VNC on my VPS using a guide I found here. I installed KDE. It all works but when I view the VPS through VNC on my windows PC the text on the screen appears to be squares as if its a non supported language.
[url]
I've uploaded a screenshot to better help you understand what I mean.
As title suggests I'm looking to make sure my hosting is set up to respond with valid PTR information so my server generated emails aren't flagged as spam.
I have full SSH access to the machine at root level.
Running a CentOS machine but there are also other virtual hosts using a shared ip.
A client recently moved one of their domains to one&one (night mare I know) he then asked us to repoint the domain name to our servers using out name servers.
We have done this and it is not resolving to our server.
The problem is that the site is no longer showing and their emails are down.
I used a domain dossier and the DNS record looks like it should be changed but I'd like some confirmation on this.
I desperately need someone to help with a tomcat installation on a dedicated server. I have tomcat working properly but the app is not connecting properly to the database.
I get this error message when I try to add a new domain from within Plesk 12 for Windows..Error: ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique (Error code 1)
I have added .co.uk - .com and others no issues at all.
There has been a recent rash of Windows 2003 customers being hacked and having "UTorrent" installed, as well as having their Administrator password changed, rendering the server inaccessible.
At the moment, we have yet to determine the vulnerability in Windows allowing the hackers to breach the systems however we believe it is related to RDP. We highly suggest you are complying with the following, to lessen your risk of having your server compromised:
1) Run RDP on a non-standard port [url]
2) Run a software firewall on your machine, blocking ALL unnecessary ports on your server. You should only have the bare minimum open.
3) Limit any non-public access to your IP and trusted IP's only. This will prevent any other outside networks or servers from reaching your machine through ports which are not meant to be public (http for example)
4) Ensure you have FULL updates for your Windows O/S, immediately.
5) Ensure any 3rd party software you are running, has also been fully updated to the latest version including any patches.
Please make sure these suggestions are implemented immediately to lessen you risk of being hacked by the current wave of exploits.