The first is to use sudo to run the text editor. For example, to edit your fstab file you could type:
sudo nano /etc/fstab