How to block the use of apps from other users

Randol Albert

How would I go about not allowing none-administrative users from using applications that I don't them to? I'm new to configuration files so please give me step-by-step instructions so that I don't screw up my machine by accident.

Ben Wesemann

If a program is shared in /usr/share, then all users have rights to execute them. A simple way of restricting other users from executing these files, without uninstalling and reinstalling, is by changing the access permissions.

Run this line of code, replace program with the name of the program you wish to restrict permissions. (Replace /usr/share with the actual location if the file you are restricting isn't in the share file.)

$ ls -al /usr/share | grep program

Out put is going to be something like

drwxr-xr-x   3 ben   adm   102B Feb 12 23:11 program

In my case, the file is readable and executable by every user, the owner is me (ben), and it belongs to the group adm(administrators).

We want the files group to be something that only the admins can access. Use a group that all admins are in (such as adm), and change it using:

 # chown :adm /usr/share/program

Next we wanna change it to only be readable and executable by the owner and the group.

# chmod 750 /usr/share/program 

That will change the permissions to drwxr-x---

Success!

That should do the trick. Test it out and lemme know if it doesn't work?!?!

Also, here's how permissions work on files https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions Hope that's useful for the future.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How get access token from other users

분류에서Dev

How to modify permission of other installed apps on android?

분류에서Dev

How to use longjmp from main function to other functions?

분류에서Dev

How to use a method from other class Java Android onClick?

분류에서Dev

CKEditor - How to show block other than <p> block (startupOutlineBlocks)

분류에서Dev

How to add newDataValidation() code block into my Google apps script

분류에서Dev

unix process run as root even though start from other users

분류에서Dev

unix process run as root even though start from other users

분류에서Dev

How to use associative array in JavaScript to retrieve users?

분류에서Dev

How to limit users permissions to only use mysql

분류에서Dev

How to block a common user use startx command?

분류에서Dev

How does ps get the executable of processes of other users?

분류에서Dev

How to load other users Twitter wall using Hybridauth

분류에서Dev

How to deny users from creating subdirectories?

분류에서Dev

How do I Use other functions from a different class in Asynchronous methods

분류에서Dev

MVCPortlet: use doView method from an other method

분류에서Dev

Use enum from header in other class

분류에서Dev

How to block yum from upgrading obsoleted package?

분류에서Dev

How can an object be created from a static block?

분류에서Dev

How to open the iBook file without use the third party apps?

분류에서Dev

How do Django in VIsual Studio use South migrate apps?

분류에서Dev

how to route local IP to use NIC and other to use Wifi NIC

분류에서Dev

How do I switch desktop session users from a shell script?

분류에서Dev

How to copy all database users from one database to another

분류에서Dev

Common use of apps in Django

분류에서Dev

how to control one program from other

분류에서Dev

How to close Chrome window from the other application?

분류에서Dev

How to get a TextView from other class

분류에서Dev

how is Array object different from other objects

Related 관련 기사

  1. 1

    How get access token from other users

  2. 2

    How to modify permission of other installed apps on android?

  3. 3

    How to use longjmp from main function to other functions?

  4. 4

    How to use a method from other class Java Android onClick?

  5. 5

    CKEditor - How to show block other than <p> block (startupOutlineBlocks)

  6. 6

    How to add newDataValidation() code block into my Google apps script

  7. 7

    unix process run as root even though start from other users

  8. 8

    unix process run as root even though start from other users

  9. 9

    How to use associative array in JavaScript to retrieve users?

  10. 10

    How to limit users permissions to only use mysql

  11. 11

    How to block a common user use startx command?

  12. 12

    How does ps get the executable of processes of other users?

  13. 13

    How to load other users Twitter wall using Hybridauth

  14. 14

    How to deny users from creating subdirectories?

  15. 15

    How do I Use other functions from a different class in Asynchronous methods

  16. 16

    MVCPortlet: use doView method from an other method

  17. 17

    Use enum from header in other class

  18. 18

    How to block yum from upgrading obsoleted package?

  19. 19

    How can an object be created from a static block?

  20. 20

    How to open the iBook file without use the third party apps?

  21. 21

    How do Django in VIsual Studio use South migrate apps?

  22. 22

    how to route local IP to use NIC and other to use Wifi NIC

  23. 23

    How do I switch desktop session users from a shell script?

  24. 24

    How to copy all database users from one database to another

  25. 25

    Common use of apps in Django

  26. 26

    how to control one program from other

  27. 27

    How to close Chrome window from the other application?

  28. 28

    How to get a TextView from other class

  29. 29

    how is Array object different from other objects

뜨겁다태그

보관