Troubleshootings

Today I was migrating CPanel account to another server using a WHM/Cpanel Utility /scripts/pkgaccount. Package was successfully migrated to a new server and domain was live again on new server. But several functionality of the site was not working and the following error was appearing in apache error log constantly.

symbolic link not allowed or link target not accessible

There are two possibility of this error:

  1. Your apache configuration doesn’t allow to Follow Sym Links.
  2. Your SymLink owner doesn’t match (This usually happens on WHM/CPanel because CPanel uses unique user for unique domain)

Fix “symbolic link not allowed or link target not accessible” on WHM/CPanel Server : 

Connect to your WHM/CPanel with root privileges from browser e.g http://example.com:2086

Go To

Main >> Service Configuration >> Apache Configuration >> Global Configuration

Check FollowSymLink

FollowSymLinks

Now, in our example your domain name is hackersgarage.com and your CPanel user is hacker. Simple change ownership of your symlink files to hacker

Jumple to document root of your domain
cd /home/hacker/public_html/

Change ownership
chown hacker:hacker *

If you are still having difficulties or unable to change ownership of files or its just not working.
You can again Go To;

Main >> Service Configuration >> Apache Configuration >> Global Configuration

Uncheck SymLinksIfOwnerMatch

SymLinksIfOwnerMatch

Save it! It should rebuild Apache configuration and reload httpd daemon.

Fix “symbolic link not allowed or link target not accessible” on With Control Panel Server (CentOS/Ubuntu/RedHat):

vim /etc/httpd/conf/httpd.conf

Add

Options +FollowSymLinks -SymLinksIfOwnerMatch

Reload httpd
/etc/init.d/httpd reload

on debian base distro;
/etc/init.d/apache gracefull

If you don’t have access to httpd.conf, you can add this in your .htaccess of your document root.
vim .htaccess

Options +FollowSymLinks -SymLinksIfOwnerMatch

Save it! Here you don’t need to reload httpd daemon.

Note :  Using .htaccess method you need to make sure, your httpd.conf is configured/instructed to read .htaccess in your document root.

{ 0 comments }

Openx is enterprise class ad inventory solution for your business. Normally I carry out its configuration from command line interface but this moment I decided to enable one plugin using UI (Web based Interface) but it failed and the following error appeared on screen:

It is not possible to edit all settings because the configuration file is locked for security reasons. If you want to make changes, you may need to unlock the configuration file for this installation first.

 

I tried to see all option but didn’t find a way to unlock the configuration file. Finally I found that its config file should be writable by your apache user.

To UnLock Configuration File :

chmod 666 /home/hackersgarage/public_html/var/ads.hackersgarage.com.conf.php

To Lock Configuration file back :

chmod 644 /home/hackersgarage/public_html/var/ads.hackersgarage.com.conf.php

It is recommended to lock it back when you are finished with your web based configuration.

{ 0 comments }

Today i captured one tutorial using recordmydesktop utility on my backtrack and decided to view it but unfortunately backtrack 5 Linux didn’t include a good media player to do entertainment :-D when you get bored with dirty work.

Anyways, i installed vlc using following command ;
aptitude install vlc

And tried to run vlc as root i got error on my terminal ;
vlc

VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).

This error says straight forward vlc can not be run as root privileged user. What to do now? Don’t be panic. Here is the hacked solution :-D
vi /usr/bin/vlc
search for geteuid and replace it with getppid

Save file & Exit.

Now it should work, try to run it again ;-)

Note : This is a very bad practice to run certain application with administrative rights. Do it at your own risk! ;-)

{ 7 comments }

I call this Error in error, because it reports wrong error.

I got this error while i execute ./adb devices

ERROR :

adb: No such file or directory

Error itself is very confusing, because the file is exist there and it reports false error. Well after searching on googe, found i36 compatibility libraries are missing there which i installed it simply with apt-get.

FIX “adb: No such file or directory”

apt-get install ia32-libs

It worked great for me. Let me know if you are stuck in same trouble.

{ 7 comments }

This is because of you have set invalid IP in /etc/nrpe.cfg

e.g my correct IP of ethernet is 192.168.0.50

vi /etc/nrpe.cfg

add this;

server_address=192.168.0.50

now, you should see the following in /var/log/messages

tail -f /var/log/messages

Jul 7 11:03:35 hackersgarage nrpe[24067]: Starting up daemon
Jul 7 11:03:35 hackersgarage nrpe[24067]: Warning: Daemon is configured to accept command arguments from clients!
Jul 7 11:03:35 hackersgarage nrpe[24067]: Listening for connections on port 5666
Jul 7 11:03:35 hackersgarage nrpe[24067]: Allowing connections from: 192.168.0.X

{ 0 comments }