How To Give Perticular Command Permissions In Linux For The Specific Users ( Not For Root ) ?

Author: admin  //  Category: Linux

you can use chown to change the owner to the user you would like, and then use chmod to set the permissions bytes. Lookup the actual parameters using man, i.e. “man chmod” and it will tell you exactly how to form your command on the version of linux you are using. You can also use chgrp to change the group of the command, so you can give permissions by user, group, or world.

Tags: , , , , , , ,

2 Responses to “How To Give Perticular Command Permissions In Linux For The Specific Users ( Not For Root ) ?”

  1. Bigwag Dog Bakery Says:

    a little information is a dangerous thing.
    In Linux, the chmod command sets the permissions to your files. You can look at the permissions with the
    ls -l .
    The available persmissions are read, write and execute. And you can set permission levels for yourself, your group and for everyone else.
    Usually you would give yourself read and write permissions by default and set the execute permission only when you specifically need it.
    For your group, it’s read permission for sure and write and execute permission as needed.
    For all others, it’s read permission only. If you give additional permission on a file, anyone, not just one specific friend, can delete or screw up your computer and files if they can gain access to your machine.
    read a file=4
    write a file=2
    execute a file=1
    notice that the maximum number when you add them up is seven. 7 means read, write and execute; 6 means read and write only; 4 means read only.
    Use the chmod command to set permissions:
    chmod 644

    the first number is your read and write perms
    the second number is group read perm
    the third number is all others’ read perm
    HINT: 644 is a good set of perms. Anyone in your group would be on your network, or you’d have to let them telnet or SSH into your network. If you were collaborating with a friend on a program, you’d want to add them to your group and add write perms to group:
    chmod 664
    Use the chgrp command to add your friend to your group.
    Never (until you’re a more sophisticated user) use the chown command. This changes the ownership of the file; once you have transferred ownership it belongs to the other person and you can not change permissions; it belongs to the person you transferred it to.
    And lastly, get the know the manual pages, the Linux online documentation. Here’s how to look at the chmod documentation:
    man chmod
    They’re hard to understand at first, but they’re an invaluable resource that you need to get friendly with. They’re your gateway to Linux knowledge!
    When the man page opens you advance one page at a time by pressing , line by line by pressing , and back a page by pressing .
    (press what’s inside the symbols, not the symbols).
    Good luck learning Linux!

  2. ronw Says:

    play with user and group permission or use sudo

Leave a Reply