Skip to content
  • Home
  • Contact Us
  • About Us
  • Privacy Policy
  • DMCA
  • Linkedin
  • Pinterest
  • Facebook
thecscience

TheCScience

TheCScience is a blog that publishes daily tutorials and guides on engineering subjects and everything that related to computer science and technology

  • Home
  • Human values
  • Microprocessor
  • Digital communication
  • Networking
  • Toggle search form
changing file access permissions in linux

Changing File Access Permissions in Linux

Posted on December 13, 2022January 29, 2023 By YASH PAL 4 Comments on Changing File Access Permissions in Linux

Changing File Access Permissions – The Linux file access permission scheme lets you give other users access to the files you want to share yet keep your private files confidential. You can allow other users to read from and write to a file (handy if you are one of several people working on a joint you are proposing). Or you can allow others only to write to a file (similar to an inbox project).

changing file access permissions in linux

You can allow others only to read from a file (perhaps a project specification or mailbox, where you want others to be able to send you mail but do not want them to read your mail). Similarly, you can protect entire directories from being scanned. The owner of a file controls which users have permission to access the file and how those users can access it. When you own a file, you can use the chmod (change mode) utility to change access permissions for that file.


The chmod command is used to change the permissions of a file or directory. To use it, you specify the desired permission settings and the file or files that you wish to modify There are two ways to specify the permissions, but I am only going to teach one way It is easy to think of the permission settings as a series of bits (which is how the computer thinks about them). Here’s how it works:


rwxrwxrwx = 111 111 111
rw – rw – rw = 110 110 110
rwx — — = 111 000 000
and so on.
rwx = 111 in binary = 7
rw- = 110 in binary = 6
r-x = 101 in binary = 5
r– = 100 in binary = 4


Now, if you represent each of the three sets of permissions (owner, group, and other) as a single digit, you have a pretty convenient way of expressing the possible permissions settings. For example, if we wanted to set some_file to have read and write permission for the owner, but wanted to keep the file private from others, we would:

[me@Linuxbox me]$ chmod 600 some file

Here is a table of numbers that covers all the common settings. The ones beginning with files. 7″are used with programs (since they enable execution) and the rest are for other kinds of files.

ValueMeaning
777(rwxrwxrwx) No restrictions on permissions. anybody may do anything. Generally not a desirable setting.
755(rwxr-xr-x) The file’s owner may read, write and execute the file. All others may read and execute the file. This setting is common for programs that are used by all users.
700(rwx——) The file’s owner may read, write, and execute the file. Nobody else has any rights. This setting is useful for programs that only the owner may use and must be kept private from others.
666(rw-rw-rw-) All users may read and write the file.
644(rw-r–r–) The owner may read and write a file, while all others may only read the file. A common setting for data files that everybody may read, but only the owner may change.
600(rw——-) The owner may read and write a file. All others have no right. A common setting for data files that the owner wants to keep private.
engineering subjects, linux Tags:engineering subjects, linux

Post navigation

Previous Post: Access permissions in linux
Next Post: Hard links and Symbolic links

Related Posts

Cloud Computing Characteristics cloud computing
What is CRYPTOGRAPHY and its Types Digital communication
Understanding the Body as an Instrument of I engineering subjects
Universal Human Order in Human Values engineering subjects
Sah Astitva means in Human Values engineering subjects
Natural Characteristics engineering subjects

Comments (4) on “Changing File Access Permissions in Linux”

  1. agen judi slot says:
    December 17, 2022 at 12:29 PM

    Howdy are using WordPress for your blog platform?

    I’m new to the blog world but I’m trying to get started and set
    up my own. Do you need any coding knowledge to make your own blog?
    Any help would be really appreciated!

    Reply
    1. YASH PAL says:
      December 18, 2022 at 2:23 AM

      no we don’t need any coding knowledge.

      Reply
  2. Cute dog Bowls says:
    January 30, 2023 at 7:57 AM

    I always used to read piece of writing in news papers but now as I
    am a user of web therefore from now I am using net for posts,
    thanks to web.

    Reply
  3. bowl set for tiny cat says:
    January 30, 2023 at 12:40 PM

    My brother recommended I would possibly like this blog.
    He used to be entirely right. This put up actually made my day.

    You cann’t believe simply how much time I had spent for this
    info! Thank you!

    Reply

Leave a Reply Cancel reply

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

Pick Your Subject
Human Values

Copyright © 2023 TheCScience.

Powered by PressBook Grid Blogs theme