Tag archive for ‘directadmin’

DirectAdmin 1.391 : pcfg_openfile: unable to check htaccess file, ensure it is readable

Today, I got a problem with one of my website. Suddenly, I could access my website using Nginx but all themes were gone. I, then, switched back to Apache. It became worse. I can’t access my website at all. The error when access my website using Apache is below : Forbidden You don’t have permission [...]

services that are not necessary on a web server

These are some services I would normally turn off on web servers. NOTE: usage may vary. gpm — mouse mdmonitor — monitor raid devices netfs — nfs, samba etc… autofs — automount, nfs, cd etc… kudzu — detect new hardware restorecond — monitor selinux file context mcstrans — mandatory access control selinux translation There may [...]

Check file and directory permissions under present working directory

Below commands can be used to check file and diretcory permissions under the present working diretcory (pwd) * Check files with permission 755 root@master [~]# find $x -type f -perm 755 * Check files with permission 777 root@master [~]# find $x -type f -perm 777 * Check diretcory with permissions 777 root@master [~]# find $x [...]

Disk Usage is showing 0.00

*** Note: If you’re running a VPS with a “simfs” file system, quotas usually cannot be enabled with normal means.  Contact yoru VPS provider to enable quotas for you. DirectAdmin relies on the system quotas to return a value for how much space is being used.  DirectAdmin will run /usr/sbin/repquota /home Where /homeis the quota_partition [...]

How to create a swap file

To add a swap file: Determine the size of the new swap file in megabytes and multiply by 1024 to determine the number of blocks. For example, the block size of a 64 MB swap file is 65536. At a shell prompt as root, type the following command with count being equal to the desired [...]

I’ve deleted /home, how do I recreate the directories?

Generally, this isn’t the best thing to have happen because all of the data is stored there.  You’ll need to recreate all of the directory structures, as well as a few files required for DA to run: 1) Create the DA tmp directory so you can log into DA again: mkdir -p /home/tmp chmod 1777 [...]

Setup a per-user php.ini to allow open_basedir with suPhp

new way: If you wish to use per-user php.ini files in: /usr/local/directadmin/data/users/username/php/php.ini then you can use this guideto add the code: SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/ to the VirtualHost entires for that domain and it’s subdomains.   This will tell suPhp to look in that path for a php.ini. It’s loaded after the main php.ini, so if [...]

How to setup jailed ssh and jailed cgi (beta)

If you run custombuild, the jailed script portion of this guide is in the options.conf. #Jailed shell (beta) jail=yes Then type ./build all_jail The “./jail/jail_user.sh user” (from the custombuild dir) would be used for each user you want to jail.   The remaining httpd.conf and other options from this guide still apply. 1) First, install [...]

Basic system security

Note that it’s ultimately the responsibility of the server admin to ensure his system is secure.  These are some basic security tips that can be done to help protect your system.  This is not an end-all guide for server security, admins must be diligent, but rather some suggestions for a start to securing your server. [...]

How to Optimize and Secure a Virtual Private Server (VPS) and Virtual Dedicated Server (VDS)

This article covers a wide range of methods for securing and optimizing your VPS/VDS. We do not provide any warranty for this article, so if you are not sure what you are doing please make sure you research before you do it. Secure cPanel/WHM and the Root User on VDS: Checking for formmail: Form mail [...]