background preloader

Ubuntu

Facebook Twitter

Linux: 25 PHP Security Best Practices For Sys Admins. PHP is an open-source server-side scripting language and it is a widely used. The Apache web server provides access to files and content via the HTTP OR HTTPS protocol. A misconfigured server-side scripting language can create all sorts of problems. So, PHP should be used with caution. Here are twenty-five php security best practices for sysadmins for configuring PHP securely.

Our Sample Setup For PHP Security Tips DocumentRoot: /var/www/htmlDefault Web server: Apache ( you can use Lighttpd or Nginx instead of Apache)Default PHP configuration file: /etc/php.iniDefault PHP extensions config directory: /etc/php.d/Our sample php security config file: /etc/php.d/security.ini (you need to create this file using a text editor)Operating systems: RHEL / CentOS / Fedora Linux (the instructions should work with any other Linux distributions such as Debian / Ubuntu or other Unix like operating systems such as OpenBSD/FreeBSD/HP-UX).Default php server TCP/UDP ports: none #1: Know Your Enemy . # .... The configuration defaults for gnome power manager have not been installed correctly. [Solved] Unable to boot due to GNOME Power Manager error | GeekDevs.

How to Resize Partition without Data Loss – Part 1 of 3 :: HTMLgraphic Designs. This article is about resizing ext3 partitions without losing data. It shows how to shrink and enlarge existing ext3 partitions and how to merge two ext3 partitions. This can be quite useful if you do not use LVM and you realize that your existing partitioning does not meet your actual needs anymore. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! 1 Preliminary Note I run all the commands in this tutorial as the root user, so make sure you’re logged in as root.

I have tested this on a CentOS 5.4 system hosted on VMware Workstation 7, all files in one large disk (around 200 GB, device /dev/sda). The partition that is to be resized must be unmounted when we do the resizing; obviously this is not possible if this is the partition that holds all important system files like in this example. I’m going to resize /dev/sda5 in this tutorial. 2 Shrinking An ext3 Partition to be sure. Then run The output looks like this: How To Resize ext3 Partitions Without Losing Data - Page 3. 4 Merge Two ext3 Partitions In this example I have my system partition /dev/sda1 again (about 6GB of size) which is followed directly by the partition /dev/sda3 (about 4GB of size) on the hard disk. /dev/sda3 is mounted to the /data directory and doesn't hold files needed by the Linux system, just user data. The current partitioning looks like this: df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 5.8G 4.1G 1.6G 73% / varrun 94M 132K 94M 1% /var/run varlock 94M 0 94M 0% /var/lock udev 10M 56K 10M 1% /dev devshm 94M 0 94M 0% /dev/shm lrm 94M 18M 77M 19% /lib/modules/2.6.17-10-generic/volatile /dev/sda3 3.5G 72M 3.3G 3% /data To merge /dev/sda1 and /dev/sda3, we have to delete /dev/sda3 and then enlarge /dev/sda1 as described in chapter 3.

Now we open /etc/fstab and remove the line for /dev/sda3 there if it exists: vi /etc/fstab The new file without /dev/sda3 could look like this: Then we unmount /dev/sda3 and run fdisk to delete it. Umount /dev/sda3 fdisk /dev/sda shutdown -r now su. How To Resize ext3 Partitions Without Losing Data - Page 2. 3 Enlarging An ext3 Partition In this example we have a /dev/sda1 partition with about 6GB of size, and right behind that partition we have about 4GB of unused space. We want to add those 4GB of unused spave to our /dev/sda1 partition (this doesn't work of these 4GB don't come right behind our /dev/sda1 partition, but are elsewhere on the hard disk!). First, we collect some details again about our current partitioning: df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 6047868 4224140 1639408 73% / varrun 95480 132 95348 1% /var/run varlock 95480 0 95480 0% /var/lock udev 10240 52 10188 1% /dev devshm 95480 0 95480 0% /dev/shm lrm 95480 17580 77900 19% /lib/modules/2.6.17-10-generic/volatile df -B 4k df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 5.8G 4.1G 1.6G 73% / varrun 94M 132K 94M 1% /var/run varlock 94M 0 94M 0% /var/lock udev 10M 52K 10M 1% /dev devshm 94M 0 94M 0% /dev/shm lrm 94M 18M 77M 19% /lib/modules/2.6.17-10-generic/volatile fdisk -l fdisk -s /dev/sda1.

How To Resize ext3 Partitions Without Losing Data. Version 1.0 Author: Falko Timme This article is about resizing ext3 partitions without losing data. It shows how to shrink and enlarge existing ext3 partitions and how to merge two ext3 partitions. This can be quite useful if you do not use LVM and you realize that your existing partitioning does not meet your actual needs anymore.

There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! 1 Preliminary Note (I run all the commands in this tutorial as the root user, so make sure you're logged in as root. Sudo su I have tested this on a Ubuntu Edgy Eft desktop system that has all files in one large partition (around 10 GB, device /dev/sda1).

Df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.5G 4.1G 4.9G 46% / varrun 94M 132K 94M 1% /var/run varlock 94M 0 94M 0% /var/lock udev 10M 52K 10M 1% /dev devshm 94M 0 94M 0% /dev/shm lrm 94M 18M 77M 19% /lib/modules/2.6.17-10-generic/volatile 2 Shrinking An ext3 Partition.