Okay, if you’re getting this error, you’re getting it for one of two reasons.
Advanced Policy Firewall (APF) Is Not Installed
Type in the following command:
$ /etc/apf/apf
One of two things will happen..
You’ll this error message:
/etc/apf/apf: No such file or directory
OR
You’ll get something like this:
$ /etc/apf/apf
APF version 9.6 <apf@r-fx.org>
…
If you get the first expected result, APF isn’t installed. Go to Advanced Policy Firewall project page, download it and install.
Bash “PATH” Variable
If when performing the above test got something like this:
$ /etc/apf/apf
APF version 9.6 <apf@r-fx.org>
…
It is likely your environmental “PATH” variable doesn’t cover /usr/local/sbin/ or similar. When APF is installed, it symlinks /usr/local/sbin/apf to /etc/apf/apf. To check, try the following command and see if /usr/local/sbin/ is included:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin
You can either type your commands like “/etc/apf/apf -d <source>” or you can fix the symbolic link (probably the better idea because other links may be broken).
To fix the PATH variable to include the new bin, modify your bash profile or server-wide (either ~/.bash_profile or /etc/bashrc respectively – the first is probably safer):
vi ~/.bash_profile
Again, I use vi/vim, use nano or your other preferred editor if that’s what you prefer.
Look for a variable like this:
PATH=$PATH:$HOME/bin:/usr/bin/systools
To the end, add something like:
:/usr/local/sbin
Resulting in it now looking like:
PATH=$PATH:$HOME/bin:/usr/bin/systools:/usr/local/sbin
Then I recommend you just logout and then login again. You stuff around with export, but easier to just logout/in again.
Didn’t Work?
There are a number of other possible solutions depending on the problem you’re experiencing. I’ve only covered two. Leave a comment with some output of your tests and we’ll take a look.
Similar Posts:
- Allow, Deny and Remove with Advanced Policy Firewall (APF)
- ISAPI Filter ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll’ could not be loaded due to a configuration problem
- Synchronise cPanel DNS Cluster from Command Line
- Find What IP Address cPanel Site Is Using via Command Line
- Error message “The file is either corrupted or does not have the latest credentials associated with recovery service. (ID: 34513) “
- Emails Not Sending – defer (111): Connection refused (Exim) and SMTP Tweak
- Restore SQL Azure Backup to MSSQL Server
- Error Connecting to VPN – Error 850: The Extensible Authentication Protocol type required for authentication…