• About
  • Privacy Policy
  • Contact us
  • Submit a story
Linux-News Linux news from the Blogosphere
  • Article
  • Howto
  • News
  • Opinion
  • Review
  • RSS Feed
  • Twitter
  • Facebook

How to Configure Permissions in Linux

By
News
– June 28, 2012Posted in: Article, Howto, Submitted

By Christopher P Wakefield

This time we are going to have a look at Linux permissions. Every current operating system deals with permissions, whether it is ownership of a file or just gaining read access to a folder. As with everything else in Linux there are command line tools and the graphical user interface so we shall discuss both.


The Chown Utility

This is a command line tool that deals with the ownership of a file or folder. Open up a terminal and switch to root. Navigate to the directory which contains the file / folder you want to change and type:

chown [username][file /folder]

So for example if I wanted to change the owner of a file called tools to natasha and it was located in /home/chris I would type:

cd /home/chris

chown natasha tools

To check who owns a particular file / folder you can navigate to the directory that contains the file / folder and type:

ls -l

The Chmod Utility

Next up is the chmod utility which deals with permissions themselves. Open up a terminal and switch to root. Navigate to the directory which contains the file / folder you want to change and type:

chmod [777][file / folder]

Lets first explain the numbering system above. There are three types of permissions in Linux – Read, Write and Execute which are given values of 4, 2 and 1 respectively. So in the syntax above the file would be given Read (4), Write (2) and Execute (1) permissions (4+2+1 = 7). But don’t you give permissions to people and not files or folders? Correct, that is why there are three numbers which represent the owner, group and others. Lets take an example to illustrate the point. Say I wanted to change the permissions of a file called tools.doc to owner (rwe), group (rw) and others (r) and it was located in /home/chris I would type:

cd /home/chris

chmod 764 tools.doc

This gives the owner (rwe = 7) group (rw = 6) and others (r=4) different levels of access to the file.

Graphical Means of Changing Permissions and Ownership

For people who don’t want to use the command line there is another way to do all this. I shall illustrate this using Linux Mint 9. Locate the file you want to alter by using your file manager. Right click and go to open as root. In Linux Mint 9 the background will go red when a file is open as root. Right click and go to properties. On the properties page you will be given the option of changing permissions for the owner, group and others along with changing the owner of the file. Change accordingly.

Hi I am Chris the owner of ComTech. I provide IT support to both personal and business clients from my base in Alloa, Clackmannanshire. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more. Start supporting a local business today so I can start supporting you.

Article Source: http://EzineArticles.com/?expert=Christopher_P_Wakefield

Article Source: http://EzineArticles.com/6966994

Tags: bash, chmod, chown, linux, ls, permission, shell, terminal

About News

No Comments

Start the ball rolling by posting a comment on this article!

Leave a Reply Cancel reply

Your email address will not be published.

  • Suggested Sites
    http://linuxaria.com everything about Linux http://linuxaria.com everything about Linux
  • Curated topic
  • Recent Posts
    • Uncover Your Dreams: The Ultimate Guide to John Paul Jackson’s Dream Dictionary PDF
    • How to Effortlessly Convert iPhone Photos to PDF
    • Unveiling Martin Luther’s 95 Theses PDF: A Guide to Reformation and Revolution
    • Unlock Productivity with “Just for Today na PDF”: Your Guide to Enhanced Organization and Efficiency
    • Unlock Abundance with Lakshmi Ashtothram in Telugu PDF: A Guide to Divine Blessings
    • W-9 Form 2021 PDF: Essential Guide for Accurate Tax Reporting
    • Unveiling the Secrets of Zero Carb Foods: Your Comprehensive PDF Guide
    • How to Create a Fillable PDF Form: The Ultimate Guide
    • Dive into “One Flew Over the Cuckoo’s Nest” PDF: Explore Freedom, Rebellion, and Mental Health
    • How to Make Money with Options: A Comprehensive Guide (PDF)
  • Ranking

About Arras WordPress Theme

All site content, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.