web analytics

Posts Tagged ‘plesk’

Permission denied errors when starting bind9 on Ubuntu 10.04 with Plesk 10

Written by config on . Posted in Linux, Ubuntu

Advertisement

If you are getting the following in your error log and you cannot start bind9 on Ubuntu 10.04 server with Plesk 10 installed:

named[5372]: loading configuration from '/etc/named.conf'
named[5372]: none:0: open: /etc/named.conf: permission denied
named[5372]: loading configuration: permission denied
named[5372]: exiting (due to fatal error)

Plesk for Linux – Fixing .htaccess pcfg_openfile error – permission fix

Written by config on . Posted in Linux, Ubuntu

Problem with directory / files permissions after installing some software on your Plesk Linux server ( Nagios for example known to cause this in certain scenarios ).

From /var/www/vhosts/domain.com/statistics/logs/error_log :

[critical] [client 192.168.0.13] (13)Permission
denied: /var/www/vhosts/domain.com/httpdocs/.htaccess pcfg_openfile:
unable to check htaccess file, ensure it is readable

You will see Forbidden Error in your browser.

If you check the mentioned location you will notice that .htaccess file is probably not even there. Creating it and giving it the correct permissions won’t help of course.

In our case permissions set wrong on the httpdocs / httpsdocs directory itself.
Try this to fix:

cd /var/www/vhosts/domain.com/
chmod 755 httpdocs
chmod 755 httpsdocs

You don’t have to set the permissions to 755 as 751 for example will work as well. Play with the permissions on httpdocs to find the suitable solution.

Plesk for Linux – Disabling mod_security rules for specific directory

Written by config on . Posted in Linux, Ubuntu

If you are working with Plesk Control Panel ( Linux version ) and mod security – you probably encountered some problems with specific scripts. Sometimes mod security block certain functions of the script because it thinks it is malicious code.

For example this warning taken from Apache log:

Warning. Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" required. [file "/etc/httpd/conf.d/modsecurity/modsecurity_crs_35_bad_robots.conf"] [line "27"] [id "990011"]

Lets say you want to leave mod_security as it is without removing it or disabling on the server, what you want to do is to disable this specific rule (“990011”)¬†for the specific directory in the domain and let your scripts work as it should.
Here is a quick solution.

Create a file called vhost.conf in /var/www/vhosts/domain.com/conf
containing the following:

<Directory /var/www/vhosts/domain.com/httpdocs> SecRuleRemoveByID 990011 </Directory>

Then run this in terminal:

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
service httpd restart

This is specific to Redhat/Centos.
If you cannot find websrvmng in the mentioned path you can try:

updatedb
locate websrvmng

Also pay attention that if you use Debian and Ubuntu or their derivatives, you cannot use the service command and your apache is not httpd.
Try to use

/etc/init.d/apache2 restart