Featured Posts

GoAccess is an interactive and website / web-server log analyzer tool currently better than the ApacheTop interface. It provides fast and valuable HTTP statistics for system administrators that require a visual...

Readmore

AjaxMyTop AjaxMyTop is a Web-based tool featuring an AJAX user interface for monitoring a MySQL server. Installing and configuring is fairly simple which you can done it within 2 minutes. [caption id="attachment_587"...

Readmore

Mod_spin is a content handler and/or a filter, meaning, for a specified file extension, mod_spin will read the file (or other input), parse it into an Abstract Syntax Tree (AST) and then replace the occurrences...

Readmore

Server Monitoring using DSTAT DSTAT an excellent tool which combines the overall stats of vmstat, iostat, netstat and ifstat. Dstat allows us to view all of the system resources in the real-time including the network bandwidth, network...

Readmore

BWM-NG Monitoring Network Bandwidth and Disk I/O using BWM-NG BWN-NG (Bandwidth-NG) is old and simple tool to monitor the bandwidth and disk I/O including the RAMdisk usage, this tool really helps the...

Readmore

  • Prev
  • Next

Secure Tmp Directadmin / Plesk

Posted on : 26-04-2011 | By : admin | In : Directadmin

Tags:

0

Here are few simple steps to create/secure /tmp partition on the server installed with Directadmin or plesk panel.

 

1 -> SSH the server as root.

 

2 -> Create the /tmp/tmpMnt using dd (the below example with create a 2.4 GB partition)

 

  • # dd if=/dev/zero of=/dev/tmpMnt bs=1024 count=2500000

 

3 -> Make an extended filesystem (ext3) over /dev/tmpMnt

 

  • # /sbin/mkfs -t ext3 /dev/tmpMnt

 

4 -> Backup the existing /tmp partiton

 

  • # cp -R /tmp /tmp_backup

 

5 -> Mount the new /tmp filesystem with noexec

 

  • # mount -o loop,noexec,nosuid,rw /dev/tmpMnt /tmp

 

6 -> Copy everything back to new /tmp and remove backup

 

  • # cp -R /tmp_backup/* /tmp/ ; rm -rf /tmp_backup

 

7 -> Edit the /etc/fstab and add the following line at the bottom (Save & exit)

 

  • # /dev/tmpMnt    /tmp     ext3    loop,noexec,nosuid,rw   0 0

 

8 -> Test it using the mount and umount commands

 

  • # umount /tmp
    # mount /tmp

 

9 -> List the partition and make sure it is added correctly

 

  • # df -h
    # mount

 

The output may look similar below.

 

Secure Tmp Directadmin / Plesk

Tmp Partition

Write a comment

You must be logged in to post a comment.