Hello! I'm Chamal Asela Perera.

I test code for living.

Access denied – Call ‘chmod’, May be ?

Have you ever experienced a message saying politely that you have no privileges to perform an action? I am pretty much sure that all of you may have that experience. Like for an example, suddenly your DB server stopped you have to restart the server to continue your work, but the remote user which you are using has not the right access which Oracle ( DB user ) has ( Yes, We had faced a related situation recently! )

Since we are dealing with servers & most servers are Linux based machines, we need to figure a way to handle permission related things on Linux. So then our speaker, ‘chmod’ comes to action.

There are few things you needed to know before you proceed,

  • r – Read permission
  • w – Write permission
  • x – Execute permission
  • + – Adding permission
  •  – – Revoking permission

So let’s  say you want to give the permission to everyone to access this file, Here is the way to do ,

You can check the revised access permission by simply type,

ls -la <file_name>
In this case, It should be,  ls -la test1

Likewise you can revoke access permission by following below command,
 chmod u-rx <file_name>

Starting point . . . .

If you ever thought life with computer programs are cool as MS Dhoni’s head, You my dear friend, You are so wrong. Even though it makes fun at times, most of times its not. Purpose of this blog is not to highlight the mentioned fact, but to help anyone to overcome the situations to be happened. ( Even though our beloved Google is there to rescue us )I may not be a newbie to blogosphere, I was a member of Sinhala blogger for years, Then I had to stopped my blogging, You-know-that-busy-schedule. Nevertheless, this blog cannot be paused for any given reason, this is to be continued ( Yes, that’s what I thought when I initiated this, Let’s see how far this goes )

For a starting point, I would like to talk about the crisis which I’ve faced so far, crisis which I am going to be faced ( If it possible ), So let’s officially start this !

All the best amigos !