Archive for June, 2011

h1

Changing permissions of just files or just directories recursively

June 22, 2011

Sometimes you just want to change the permissions of all the fiels or all the directories under a certain folder. For example, when wanting to set the sticky bit on just directories on all directories under a folder.

Here we combine the find command with chmod …

find /path/to/someDirectory -type d -print0 | xargs -0 chmod g+s

And for just files (for when you forget that chmod -R g+s is applied to everything)…

find /path/to/someDirectory -type f -print0 | xargs -0 chmod g-s

Advertisements
h1

Timing out PHP SOAP Calls

June 22, 2011

PHP has a bug when making SOAP calls over HTTPS. If the other end picks up but then does not send any data (as can happen if the SOAP server is behind a proxy or load balancer or the like) then its supposed to timeout after a specified amount of time. However, all current versions of PHP do not seem to allow this.

Thanks to Rob Ludwick for providing a workaround using CURL as the transport mechanism instead until PHP fix this. You can read about it on his blog here:
http://www.darqbyte.com/2009/10/21/timing-out-php-soap-calls

There is a PHP bug reported here for reference: http://bugs.php.net/bug.php?id=48524

h1

How to configure apache with ssl ubuntu

June 20, 2011

Guide for making an https site on ubuntu here:

https://help.ubuntu.com/8.04/serverguide/C/httpd.html