Archive for October, 2010

SBDavid

Backup using the dd command

`dd’: Convert and copy a file

`dd’ copies a file (from standard input to standard output, by default)with a changeable I/O block size, while optionally performing conversions on it. Synopses:

dd [OPERAND]…
dd OPTION

The only options are `–help’ and `–version’.

For instance, to make an exact clone of the /boot partition to a backup file, you could use:

# dd if=/dev/sda1 of=/srv/boot-linux.img

We can also use bzip2 to compresses files and then bunzip2 (or bzip2 -d) decompresses all specified files.

To clone one hard disk to another first use fdisk to recreate the appropriately-sized partitions, on the new disk and then use dd to do the actual cloning.

dd –help
Usage: dd [OPERAND]…
or: dd OPTION

Copy a file, converting and formatting according to the operands.

bs=BYTES force ibs=BYTES and obs=BYTES
cbs=BYTES convert BYTES bytes at a time
conv=CONVS convert the file as per the comma separated symbol list
count=BLOCKS copy only BLOCKS input blocks
ibs=BYTES read BYTES bytes at a time
if=FILE read from FILE instead of stdin
iflag=FLAGS read as per the comma separated symbol list
obs=BYTES write BYTES bytes at a time
of=FILE write to FILE instead of stdout
oflag=FLAGS write as per the comma separated symbol list
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
status=noxfer suppress transfer statistics

Find if initscripts or sysconfig has support for bonding

If you’re unsure whether your distro uses sysconfig or initscripts, or don’t know if it’s new enough, have no fear.

$ rpm -qf /sbin/ifup

It will respond with a line of text starting with either “initscripts” or “sysconfig,” followed by some numbers. This is the package that provides your network initialization scripts.

Next, to determine if your installation supports bonding, issue the command:

$ grep ifenslave /sbin/ifup

If this returns any matches, then your initscripts or sysconfig has support for bonding.

SBDavid

Suhosin Simulation

suhosin.simulation

Suhosin‘s features are all configured through the php.ini configuration file. For most users the Suhosin will work out of the box without any change to the default configuration needed.

If you fear that Suhosin breaks your application, you can activate Suhosin’s simulation mode with this flag. When Suhosin runs in simulation mode, violations are logged as usual, but nothing is blocked or removed from the request.

Type: Boolean
Default: Off

When you only use the Suhosin-Patch only the logging features are supported. When you only use the Suhosin-Extension you cannot use the predefined constants for configuration. This is due to the way php.ini constant support is implemented in PHP.

SBDavid

Howto fix Spam Assassin Ruleset Bug

Howto fix Spam Assassin Ruleset Bug

This bug can result in legitimate mail being flagged as spam.

The cPanel Development team has issued a hot fix that will address this issue and will automatically update the SpamAssassin ruleset to resolve this issue. If you have automatic cPanel updates enabled, no further action is required.

If you do not have automatic cPanel updates enabled, you can manually update the SpamAssassin ruleset by executing the following commands in a root shell:

/scripts/autorepair spamd_y2010_fix

The following error can be seen in the cpanel error_log and when attempting to restart Apache:

UserDir “enable” keyword requires a list of usernames

Newly created websites would be sent to defaultwebpage.cgi instead of the appropriate document root.

Resolutions:

1.) New builds, 11.25.0-CURRENT_42400 and 11.25.0-RELEASE_42400, have been published to address the issue. This issue will not be present on subsequent new installations. Upgrading a currently affected system will resolve this issue.

2.) Rebuilding the Apache configuration after the addition of the first account will permanently resolve this issue.

From the command line:

/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd

or

/scripts/autorepair userdir_enable_fix
/scripts/restartsrv_httpd


From the WHM:

Service Configuration -> Apache Configuration -> Global Configuration ->
Save -> Rebuild Configuration and Restart Apache

Reference: http://www.cpanel.net/

« Prev - Next »