"Permission denied" is an indication that you do not have sufficient access to perform the desired operation. Permission restrictions help ensure that you do not modify something required for the system to function properly. Though it is sometimes necessary to modify restricted files / directories, it should always be done with caution.
The quickest way to modify a restricted file is to simply assume the access level of a user (i.e. root) that has the necessary permissions.
- At the user terminal, type:su -then press Enter. When prompted, type the root password then press Enter again. The terminal prompt will change from
$to#, indicating that you are now in a root terminal session.
Be VERY careful running commands at the root terminal. You have access to modify every file on the entire system and the potential to cause irreversible changes. - Make the necessary changes to your files / directories.
- Once you are finished, press Ctrl+D to exit the root terminal and return to the normal user terminal.