Thursday, March 04, 2010

IntegraTUM Web Disk

I decided to test IntegraTUM Web Disk which can provide a web interface to Samba shares, and just to get a demo working I did the following - these are not necessarily the best options for actual deployment.
The first problem I had with this app was setting the tmp directory and I eventually used:
                <param-name>uploadpath</param-name>
                <param-value>tmp</param-value>
And created that directory under:
mkdir /usr/share/tomcat6/webapps/ba/webapp/WEB-INF/tmp
chmod 777 /usr/share/tomcat6/webapps/ba/webapp/WEB-INF/tmp
While trying to get a test version of this running I got the following error.

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Could not initialize class jcifs.Config
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:636)

Being a tomcat newbie I decided to (do the wrong thing and) set TOMCAT6_SECURITY=no
vi /etc/default/tomcat6
Restarting tomcat6 brought the application up so I can test it. I could then set about configuring it with:
vi /usr/share/tomcat6/webapps/ba/webapp/WEB-INF/web.xml
The right thing would probably be to give the jar permissions.





certwatch

Certwatch checks for Apache certificates which are due to expire. By default on Red Hat / Centos there is a cron job in /etc/cron.daily which runs and sends its output to root. To configure it:
vi /etc/sysconfig/httpd
Add a line such as:
CERTWATCH_OPTS="--period 30 --address my.user@domain.tld"
It is also possible to switch it off with:
NOCERTWATCH=yes






Monday, February 15, 2010

Pancakes

Half a pint of buttermilk
8 oz Plain Flour
2 oz Caster Sugar
1 dessertspoon of Golden Syrup
1 Egg
1 teaspoon Baking Soda
1 teaspoon Salt

Mix together and cook in a buttered pan until bubbles appear then flip to do the other side.

Wednesday, February 10, 2010

Red Hat up2date Subscription

If the Red Hat subscription expires. Edit the following file:
/etc/sysconfig/rhn/sources
Comment out the following line:
up2date default
Then add this line:
yum dag http://apt.sw.be/redhat/el4/en/$ARCH/dag

Friday, February 05, 2010

MS Office 2007 Formats in Apache

In Apache 2 I added the following to stop Internet Explorer trying to open these formats as compressed archives (which they actually are) and to open them using the MS Office appliations:
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

Tuesday, February 02, 2010

HTC Hero Speed Symbols

Connection speed symbols on my HTC Hero. There are 4 symbols (shown below in order of speed) displayed in the top bar when using mobile network:

G    GPRS ~ 56 kbit/s (171 kbit/s theoretical max)
E    EDGE ~ 240 kbit/s (473 kbit/s theoretical max)
3G  3G ~ 348kbit/s to 2Mbit/s
H    HSPA ~ 3.6-7.2 Mbit/s with current hardware (up to 84Mbit/s on future hardware)

Tuesday, January 19, 2010

PHP LDAPS

When using SSL connections ot an ldap server (active directory) the ldap functions worked with non-SSL connections but not with ldaps connections. I believe this is because I was using the hostname of the LDAP server rather than the service name and thus the SSL certificate did not match the server name I was using. To resolve this I editied:
/etc/ldap/ldap.conf
and added the following line (to ignore the SSL certificate warning):
TLS_REQCERT never





Wednesday, January 13, 2010

Grub 2 Windows 7

I had initially installed Windows 7 then Ubuntu 9.10 on a singe SATA disk. Later I added an IDE disk and plugged in the SATA DVD drive and can no longer boot into Windows 7, with the error:
error: invalid signature
Press any key to continue..
Back in Ubuntu I could see that my inital SATA disk was now sdb with the IDE disk as sda - I think this is where my problem stemmed from. So I tried:
sudo update-grub
and received errors such as:
Found Windows 7 (loader) on /dev/sdb1
grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
So then I tried:
sudo grub-install /dev/sdb --recheck
Which seemed pretty successful and re-running:
sudo update-grub
Successfully built the menu again with no errors. So I rebooted and .... success!
Useful info about Grub 2 here and here.










Ubuntu Panels Lock Down

My sister had an issue with somehow moving the panels to different sides of the screen so to lock them down: In a terminal type:
gconf-editor
Expand apps > panel > global
and tick the option for locked_down