Monthly Archives: June 2010

chmod – change file/folder permission in ubuntu

sample command:

 sudo chmod 754 /opt/lampp/htdoc

chmod command sets the permission of a file or folder. chmod command uses three digit code as an argument and the file or folder location.

In the example,

  • 7 – Owner(current user)
  • 5 – Group(set by owner)
  • 4 – anyone else

The fundamental concept:

Execute is 1, Write is 2 and Read is 4.

Sum of these basic ones makes combination of permissions:

  • 0 – no permission, this person cannot read, write or execute
  • 1 – execute only
  • 2 – write only
  • 3 – execute and write only (1 + 2)
  • 4 – read only
  • 5 – execute and read only (1 + 4)
  • 6 – write and read only (2 + 4)
  • 7 – execute, write and read (1 + 2 + 3)

source: online

Installation on ubuntu 10.04

install/execute/run .sh file
.sh is a shell script. To run this kind of script go to terminal and type ./filename.sh

extraxt .tar.gz file

sudo tar xvfz package.tar.gz -C /opt
x –> extract
v –> list what is extracting(verbose)
f –> specifies the file to use
z –> location for the file to be extracted(for optional packages, usually /opt is used)

change mac address on ubuntu 10.04

There are multiple ways to change the mac address on ubuntu.

From Terminal:

  • type sudo ifconfig eth0 down hw ether your:mac:address
  • then sudo ifconfig eth0 up

Done. Now check your new mac address typing ifconfig

Another way:

setup macchanger from synaptic manager. Go to terminal and type
sudo macchanger -m <your:mac:address> <device>

Another way:

go terminal and type:
sudo gedit /etc/network/interfaces

from the last line add the following lines,
auto eth0
iface eth0 inet manual
hwaddress ether [your_mac_address]

now restart your network by typing,

<code>sudo /etc/init.d/networking restart</code>

setting PPPoE connection on ubuntu

To setup a PPPoE connection on ubuntu 10.04 follow these steps:

  • open terminal window and active the super user
  • type ifconfig pppoeconf
  • then follow the screen, type username and password where needed

If everything is done properly, then you have successfully configured your PPPoE connection.

to do it graphically, go to network connection and setup you DSL connection.

WordPress test data .xml import

I was developing wordpress theme, but while it was time for testing, it was quite annoying as lots of posting and commenting were needed. Though Lorem ipsum was there to help, but making comments and posting again and again was quite boring. The I found some test data, which solved my problem just in a second :D

click here to download the test data, extract it and then import it into your WordPress dashboard. You are done :D

If you are completely new with .xml importing then follow the following steps(for WP ver. 2.9.2):

  • Login to your wordpress dashboard (e.g http://www.example.com/wp-admin/)
  • select import from Tools
  • choose the WordPress option from the table
  • and then finally upload your downloaded file and Have Fun!

If you face any problem regarding this topic feel free to contact me.