Archive for August, 2008

How to mount Xen Tap Disk in XEN Server

Saturday, August 30th, 2008

Assume that the tap disk is using xvda

1) losetup /dev/loop0 /vm/xen_xxx/data

where /vm/xen_xxx/data is your xen image

2) Once this is mounted, You can do a fdisk to check the partition inside /dev/loop0

3) kpartx -a /dev/loop0 to reload the partition layout

4)  mount /dev/mapper/loop0p1 /mnt to mount the partition into /mnt

Cheers.

IIS7 - DEBUGGING ASP Application

Friday, August 15th, 2008

Classic ASP: Security is Painful

I had to write some good old classic ASP code today and my classic ASP coding skills are so rusty that I put tons of errors in the code. I’m used to having basic ASP error messages on IIS5 and 6 which usually help me to track down problems. On IIS7 I only got the following though:

An error occurred on the server when processing the URL. Please contact the system administrator

After investigating a bit I figured out that we changed the default for the “scriptErrorSentToBrowser” flag in IIS7. It’s now false and you always get the error above. Here is how to change it:

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

Once you are done with debugging your ASP app please set it back to false. There are lots of ‘evildoers’ out there! :)

Disable Unwanted Service

Sunday, August 10th, 2008

chkconfig –level 3 yum-updatesd    off
chkconfig –level 3 xfs             off
chkconfig –level 3 sendmail        off
chkconfig –level 3 rpcidmapd       off
chkconfig –level 3 rpcgssd         off
chkconfig –level 3 portmap         off
chkconfig –level 3 pcscd           off
chkconfig –level 3 nfslock         off
chkconfig –level 3 netfs           off
chkconfig –level 3 kudzu           off
chkconfig –level 3 iptables        off
chkconfig –level 3 ip6tables       off
chkconfig –level 3 firstboot       off
chkconfig –level 3 gpm             off
chkconfig –level 3 bluetooth       off
chkconfig –level 3 cups            off
chkconfig –level 3 avahi-daemon    off
chkconfig –level 3 autofs          off