What Should The Permissions of the kubectl File Be on a Linux server?

Problem scenario
You copied the kubectl file. You are not sure what the permissions it should have. When you try to execute it, you get "Permission denied". What should you do?

We recommend using this (after you change directories to the one that has the kubectl file): sudo chmod 777 kubectl

When you use conjure-up, it makes kubectl have 777 permissions. We find this to be a reasonable standard that works. It allows for other users to use it. The ownership and group associated with the kubectl file is root by default when you deploy kubernetes with conjure-up. A disadvantage of this solution is that the kubectl command is important and powerful, and any user will be able to run it after you make this change. Any user could also delete the kubectl file if you run the command above.

Leave a comment

Your email address will not be published. Required fields are marked *