How to change file/folder permissions in linux

Posted: November 13, 2011 in Linux
Tags: , , , , , , , ,

Recently i crossed through a serious issue of folder permissions.. I installed xampp in /opt folder which is under file system.. And i was not able to add or copy files into that folder. Even in the properties bar the option is shaded as i was not logged on as the root user.. Now, its the time to know how to unlock all permissions.

User permissions can be provided using the command “chmod”. We have to specify for which user we are going to give permission and what permission we are going to approve.

u user/owner
g group
o other
a all

and file permissions are

r read
w write
x execute

what to do?

+ add permission
– remove permission
= set exactly this permission

For example,

$ chmod a+rwx /opt/lampp -R

In the above example i gave permission to all the users for read, write and execute inside lampp folder under /opt. If you add -R the permissions will also get applied for the subfolders. For more details use manual

$ man chmod

Once you finish above tasks we need to solve the phpmyadmin error..  First we have to change permission for my.cnf file. Type this command

$ chmod 644 /opt/lampp/etc/my.cnf

and then open /opt/lampp/phpmyadmin/libraries/Config.class.php . Search for


replace with


save the document and restart xampp .

  1. fabian5003 says:

    Thank you! 😀

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s