How to Make Files Accessible Only by Root?

I'm using Ubuntu and I'm here to know is there any way to modify access of a specific application so that it can only root has access to it?

Currently that application can be launched by general users but I want to make it so that only root can do this.

2 Answers

Make sure that the owner of the application is root and set the permissions such that only the owner can run it.

sudo chown root:root /path/to/application
sudo chmod 700 /path/to/application

If you look now at permissions with ls -l /path/to/application, you should see the following: -rwx------ root root, meaning that root can read, write and execute, and anyone else cannot even read that file.

4

Change the permissions of this applications as a root :

chmod 700 application-name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest