How To Change File or Directories On Linux 2

May 2, 2008 Linux Security | Comments (0) admin @ 8:50 am

2. Change by GroupLinux Directory

Use this permission file for Example (-rw-rw-r–) from this permission it mean :
File owner can read and write can not to execute.
User in owner group can read and write, but can not to execute.
Other user out of this group can read only.

About File permission
- r can read.
- w can write.
- x can execute.

Group of person
- u file owner.
- g user in group of file owner.
- o other user out of group file owner.
- a all 3 groups

For this Example will use + and – for add and delete permission.

Exam : If you want to change all users and groups can execute this file (yourfile.txt) you need to use command as below :

#chmod a+x yourfile.txt

Exam : If you want to set owner and group can execute this file use the command :

#chmod ug+x yourfile.txt

Options for chmod command
- c you can see result after use this command on display.
- R use this option for change permission to all subdirectory or all files in subdirectory.

Firewall Configuration Example 2

May 1, 2008 Linux Security | Comments (0) admin @ 11:14 pm

Firewall for other ServerFirewall Configuration

For other server you can use one network card for connecting to internet that is eth0, by cutting out eth1 section after that you can select disable no need services, Example. if you setting up webserver you need to open HTTP port (80) and SSH port (22) only or if you use MySQL database you will need to open port 3306. If you install mail server you need to open port 110, 143, and 25 for using mail server, using script as below and modify it to match for your server :

#!/bin/sh
#chkconfig: 2345 60 95
#description: IPTABLES Firewall \
#CALL FUNCTION——————————-
. /etc/rc.d/init.d/functions
#CHECK NETWORK—————————-
. /etc/sysconfig/network
#CHECK NETWORK STATUS—————–
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
if [ ! -x /sbin/iptables ]; then
exit 0
fi

#CREATE SCRIPT FOR PARAMETER BEHIND SERVICE—————————
case “$1″ in
start)
echo -n “Starting Firewall : ”
#———————————————————————

Read More…