Friday, March 14, 2008

Changing only directory permissions in linux

Yesterday I have noticed that vTiger has released stable 5.0.4 version that was a key thing to upgrade from previous 5.0.4 RC. The procedure looked simple stupid.

But the problem I faced was linux file/directory permissions. The patch which should have been applied to the previous vTiger version consisted of many files which had 777 (read write for all) permissions. I know chmod but I nevertheless couldn't find the way to change only directory permissions.

So I googled for a while and found very useful bunch of commands. This will let you to change only directory permissions in unix:

find . -type d -exec chmod go-w {} \;


finds all directories (notice -type d) in the current directory and forbids to write for group and others (go-w)

find . -type f -exec chmod ug-r {} \;
finds all files in the current directory and forbids to read for owner and group

Sunday, March 2, 2008

Easy Eclipse for PHP

Today I have finally decided to move on creating PHP projects using EasyEclipse IDE. This great tool recently was in my mind but rather I was using UltraEdit.

After installing I have one very annoying issue with opening PHP files from Eclipse navigator. When opening some file it was opened not only in Eclipse Editor, but also in my default windows Editor - Ultraedit.

After googling for about 2 hours and getting no information how to solve this I decided try to tune Windows :) And surprisingly I found a solution: all you have to do is to delete *.php extension from File Types (under Windows -> Folder Options) in order to prevent these files being opened by your default Windows Editor. In other words, you should unassociate *.php extension in your operating system so EasyEclipse for PHP will behave correctly opening only one desired file instead of two...