• 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
– December 8, 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

Tags: cd home, command line tool, command line tools, file folder, folders, Graphical user interface, linux, linux permissions, operating system, owner group, syntax, type chmod, type ls

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
    • Discover the Joy of Mother’s Day: Free Printable Coloring Cards PDF
    • Reduce PDF Size: Ultimate Guide to Optimize and Shrink Your PDFs
    • How to Shrink PDF File Size: Tips and Techniques for Optimal Compression
    • How to Make a PDF Fillable: A Comprehensive Guide
    • How to Effortlessly Convert PDF to JPG: A Comprehensive Guide
    • Unlock PDF Mastery: How to Open PDFs in Adobe for Optimal Handling
    • US Blank Map PDF: A Comprehensive Guide for Customization and Optimization
    • Ketogenic Diet Done Right: Your Free PDF Guide to Success
    • Download Preach My Gospel PDF for Effective Missionary Work
    • How to Convert Word to PDF for Free: The Ultimate Guide to Seamless Document Conversion
  • Ranking

About Arras WordPress Theme

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