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