Error:
After running /scripts/fixquotas it gives the following error message and showing unlimited disk space in
WHM >> Main >> List accounts.
==============================================================
edquota: Quota file not found or has wrong format.
No filesystems with quota detected.
==============================================================
Solution:
The error is due to no quota file. You can follow the steps shown below to fix this issue.
root@server [~]# touch /home/quota.user
root@server [~]# touch /home/quota.group
root@server [~]# chmod 600 /home/quota.user
root@server [~]# chmod 600 /home/quota.group
root@server [~]# quotacheck -acugvm
quotacheck: Scanning /dev/simfs [/] quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
done
quotacheck: Checked 16689 directories and 234323 files
quotacheck: Old file not found.
quotacheck: Old file not found.
root@server [~]# /scripts/fixquotas --force
Installing Default Quota Databases......Done
Quota Mode: Linux
journaled quota support: not available with vzaquota (disabled)
Quotas have been enabled, however they may not be up to date as quotacheck has been skipped.
Reading package Starter
Resetting quota for arun to 2000 M
.
..
...
Thanks...
Microsoft JET Database Engine error '80004005'
Error:
The following error typically occurs when your script attempts to perform an UPDATE or some other action that alters the information in the database.
===========================================================================================
Microsoft JET Database Engine error '80004005'
The Microsoft Jet database engine cannot open the file 'C:\Inetpub\vhost\YourSite\Databases\YourDatabase.mdb'.
It is already opened exclusively by another user, or you need permission to view its data.
/YourSite/YourDataAccessPage.asp, line 15
=============================================================================================
Solution:
The above error occurs because ADO(ActiveX Data Objects) is unable to write to the Microsoft Access database due to insufficient write/modify permissions, which can be easily fixed by granting read/write to IUSR_<machineName> and IWAM_<machineName>.
IUSR_<machineName> and IWAM_<machineName> come into focus when an anonymous web user needs to modify the Microsoft Access database & while doing so Jet creates an .ldb file to handle database locking. If the above mentioned 2 users don't have the necessary permissions, the lock file isn't created & ultimately the Microsoft Access database can't be modified.
To fix this problem,
1. Make sure that the MDB file itself isn't marked as read-only.
2. Right click the folder in which the *.mdb files belongs and choose the properties option and select the Security tab. Give read/write permissions to IUSR_<machineName> and IWAM_<machineName> users. If there is no such users listed in it, add those users for that folder.
Note:-
There is also an alternate solution for this issue. You can find a user called 'everyone', add this user for the folder in which *.mdb belongs and give read/write permissions. But this is not good because of security reasons.
Reference:
http://imar.spaanjaars.com/263/how-do-i-fix-asp-80004005-errors
WebAdmin link for MSSQL database shows 404 page not found
Error:
WebAdmin link for a Plesk user's MSSQL database shows 404 page not found.
Login To Plesk >> Databases >> WebAdmin show below error(Redirects to URL below):
==================================================================================================
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /mssql/app/connect.aspx
WebAdmin link for their MSSQL database shows 404 page not found.
==================================================================================================
Solution:
1. Firstly try to ping the sub-domain mssql.mydomain.com and check if it is working or not, if not, you need to create a dns entry for mssql. If the same error still persists, you can run the following commands in the 'cmd'.
2. Run the commands one by one in 'cmd'
> cd %plesk_bin%
> websrvmng.exe --reconfigure-sqladmin
> defpackagemng.exe --fix --type=sqladminmssql
Error in Detach a database in the MSSQL Management Studio
Error:
When you try to Detach a database in the MSSQL Management Studio, you may seen the following error.
When this issue happend to me, there is no issues in creating, deleting, detaching database. There is problem only in the Detaching option.
-----------------------------------------------------------------------------------------------------------------------------------------------------
C:\Program files(x86)\Parallels\Plesk\Databases\MSSQL\MSSQL.1\MSSQL\Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.
If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Solution:
1. Run services.msc to view all the Services in the server.
Check the "Log On As" column of that service, whether it is 'Local System' or 'Network System'.
If it is 'Network System', you have to change to 'Local System', which will fix your issue. The following screenshots will give you to change it.
Log On As:
Local System Account
Click on Allow service to interact with Desktop
Then click option OK.
Select General tab. You Stop and Start the service in there.
Then click option OK.
Thanks...
OpenVZ - Operation not permitted on changing date
Error:
When you try to set date in a OpenVZ container, it may show Operation not permitted error.
Reason:
The capability for setting time is not given for the container.
sys_time capability mustbe enabled for the container to set the date and time.
Solution:
1. Login to OpenVZ Hardware Node as root user.
2. [root@HN ~] # vzlist -a | grep <IP of VPS>
<VPSID> 59 running <IP> server.example.com
3. [root@HN ~] # vzctl stop <VPSID>
4. [root@HN ~] # vzctl set <VPSID> --capability sys_time:on --save
5. [root@HN ~] # vzctl start <VPSID>
Now the capability parameter for changing time is given for the container.
Try again changing the date. This time it will permit you to change the date and time.
Reference:
http://wiki.openvz.org/Man/vzctl.8#Capability_option
Setup Full Server Remote Backup using rsync via SSH
Full Server Remote Backup using rsync via SSH
Step1:
Login to your server via ssh which you want to take backup. Login as root user.
Check the rsync operation in your server. This time it will ask for the password.
root@server [~] # rsync -avz -e ssh /test root@<BackupServerIP>:/backup/
You have to follow Step2 to make key based ssh login from a particular IP.
Step2:
In order to run the cronjob for creating backup, you need to configure rsync over ssh that doesn’t ask for a password.
Create an RSA encryption key for use with the SSH transport.
root@server [~] # ssh-keygen -t rsa -N ''
Use ssh-copy-id, to copy the public key to the remote host(Backup server).
root@server [~] # ssh-copy-id -i ~/.ssh/id_rsa.pub root@<BackupServerIP>
This time it will ask for the ssh password for the root user to copy the key.
Step3:
Test rsync over ssh without password
root@server [~] # ssh <BackupServerIP>
Now, you should be able to ssh to remote host without entering the password. If it is working fine perform a test rsync operation. It will not ask for password this time.
root@server [~] # rsync -avz -e ssh /test root@<BackupServerIP>:/backup/
Step4:
If Step3 passed the tests with rsync, you have to make a cronjob to run the backup periodically.
root@server [~] # crontab -e
0 1 * * * rsync -avz --exclude=/proc --exclude=/sys --exclude=/dev -e ssh / root@<BackupServerIP>:/backup
The above cronjob will take backup of the entire server excluding /proc, /sys and /dev direcories. The above cronjob will run on every day at 1AM.
Reference:
http://www.tutorialspoint.com/unix_commands/rsync.htm
http://www.thegeekstuff.com/2011/07/rsync-over-ssh-without-password/
Most Frequently used Commands in Exim
Most Frequently used Commands in Exim
Managing the Mail queue using 'exim' command
# exim -bpc
-Print the total number of mail in mail queue.
# exim -bp
-Print a listing of mails in the queue (time queued, size, message-id, sender, recipient)
# exim -bp | exiqsumm
-Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
# exiwhat
-To print what Exim is doing right now
----------------------------------------------------------------------------------------------------------------------------------
# exim -Mvh <message-id>
-To view a message's headers
# exim -Mvb <message-id>
-To view a message's body
# exim -Mvl <message-id>
-To view a message's logs
# exim -Mes <message-id> <address>
-To edit the sender of a message
# exim -Mrm <message-id>
-To remove a message from the queue
# exim -Mf <message-id>
-To freeze a message
----------------------------------------------------------------------------------------------------------------------------------
# exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm
or
# exim -bp | grep frozen | awk '{ print $3 }' | xargs exim -Mrm
-To remove all frozen mails in the queue
----------------------------------------------------------------------------------------------------------------------------------
To check how exim will route a given address:
# exim -bt alias@localdomain.com
user@thishost.com
<-- alias@localdomain.com
router = localuser, transport = local_delivery
# exim -bt user@localdomain.com
user@localdomain.com
router = localuser, transport = local_delivery
# exim -bt user@remotehost.com
router = lookuphost, transport = remote_smtp
host mail.remotehost.com [1.2.3.4] MX=0
=================================================================================
Managing the Mail queue using 'exiqgrep' command
Exim includes a utility called exiqgrep, that is very useful for grepping through the queue.
# exiqgrep -f user@domain.com
-To search the queue for messages from a specific sender
# exiqgrep -r user@domain.com
-To search the queue for messages for a specific recipient/domain
# exiqgrep -o <sec>
-To print messages older than the specified number of seconds.
# exiqgrep -y <sec>
-To print messages that are younger than the specified number of seconds.
# exiqgrep -i
-To print the message-id of the entire queue
# exiqgrep -c
-To print a count of messages
----------------------------------------------------------------------------------------------------------------------------------
# exiqgrep -zi | xargs exim -Mrm
# exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
-To remove all frozen messages
# exiqgrep -o 86400 -i | xargs exim -Mrm
-To remove all messages older than 1 day.
# exiqgrep -i -f user@domain.com | xargs exim -Mf
-To freeze all queued mail from a given sender
# exiqgrep -i -f '<>' | xargs exim -Mrm
-To remove all mail delivery failure mails.
Reference:-
http://bradthemad.org/tech/notes/exim_cheatsheet.php




