Questions tagged [access-control]

Access control is the process of limiting the access of ability of users or services to certain resources.

Historically, there have been several access control models:

  • discretionary access control (DAC): In computer security, discretionary access control (DAC) is a type of access control defined by the Trusted Computer System Evaluation Criteria "as a means of restricting access to objects based on the identity of subjects and/or groups to which they belong. (source: Wikipedia)
  • mandatory access control (MAC): The mandatory part of the definition indicates that enforcement of controls is performed by administrators and the operating system. This is in contrast to the default security mechanism of Discretionary Access Control (DAC) where enforcement is left to the discretion of users.(source: wikipedia)
  • Role-based access control (RBAC): Role-based access control (RBAC) is a method of regulating access to computer or network resources based on the roles of individual users within an enterprise. RBAC was formally defined by NIST, the National Institute of Standards and Technology. More can be found on their website.
  • Attribute-based access control (ABAC): ABAC extends the way RBAC works. Instead of just focusing on user identities, roles, and groups, ABAC defines attributes (key-value pairs) that can be used to describe users, resources, actions, and context. With ABAC, it is possible to define finer-grained access policies. A common language used to define ABAC is XACML. NIST is currently formalizing ABAC. See their website for more information.
180 questions
104
votes
5 answers

How to check if a user can access a given file?

*nix user permissions are really simple, but things can get messy when you have to take in account all the parent directory access before reaching a given file. How can I check if the user has enough privileges? If not, then which directory is…
Metalcoder
  • 1,185
  • 2
  • 8
  • 11
44
votes
1 answer

Difference between sudo user and root user

The /etc/sudoers file lists which users can do what with the sudo command The root user creates and modifies the /etc/sudoers file. This concept is difficult for me to understand. If all users having sudo privilage belong to sudoers group, then all…
rancho
  • 629
  • 2
  • 8
  • 13
23
votes
1 answer

Are SELinux rules enforced before or after standard linux permissions?

When SELinux is installed on a system are its rules enforced before or after the standard linux permissions? For example if a non-root linux user tries to write to a file with linux permission -rw------- root root will SELinux rules be checked first…
satur9nine
  • 651
  • 4
  • 16
23
votes
8 answers

Which access rights can't the superuser violate?

Fr. Br. George told in one of his lectures (it's in Russian) that there are some access rights that superuser can not violate. That is there are some access right which can forbid superuser doing something. I was not able to find this information on…
Kolyunya
  • 579
  • 2
  • 7
  • 16
22
votes
3 answers

Myth or reality: SELinux can confine the root user?

I read or heard somewhere (maybe in LinuxCBT's SELinux course; but I'm not sure) that there are online Linux servers, for which the password of the root user is also given. The Linux server is hardened using SELinux rules, such that everyone can…
Sadeq Dousti
  • 383
  • 1
  • 3
  • 9
20
votes
2 answers

Restarting systemd service only as a specific user?

I created some systemd services which basically works: location: /etc/systemd/system/multi-user.target.wants/publicapi.service content: [Unit] Description=public api startup…
Bevor
  • 671
  • 2
  • 11
  • 22
15
votes
3 answers

Is it a good practice to run a daemon under a non-root user account?

I've developed an application that uses NTP to change the network time, to sync two of my computers. It runs as root, since only the latter is allowed to change the time and date on Linux(I guess). Now, I want to run it as a user. But, I need to…
Anonymous12223
  • 513
  • 3
  • 6
  • 17
14
votes
1 answer

Restrict local port access to a specific user

I'm trying to restrict access to a particular port for a particular user on my Debian. Let's say user's id is 1000 and port I would like to block is 5000. I tried using iptables with the following command : iptables -I OUTPUT -o lo -p tcp --dport…
13
votes
1 answer

How to stop users from Switching to Root user

I have disabled the root user login from Sshd.conf file so now no one can login using root user even if they know the password SOMEHOW. Now I have 3 users in server ROOT,EMERG and ORACLE. I want to allow switching to ROOT only to EMERG user by…
OmiPenguin
  • 4,168
  • 34
  • 79
  • 111
13
votes
2 answers

Can I make a file only accessible to a script, and not a user?

I have a user with limited access on the system (that is, he is not a sudoer); let's call him Bob. I have a script or a binary which I, the system administrator, trust, and would have no problems running it as root; let's call the script…
IQAndreas
  • 10,145
  • 21
  • 59
  • 79
11
votes
2 answers

Can users in a group access a file that is in another user's home directory?

I have 3 users A,B and C inside a group 'admin'. I have another user 'D' in whose home directory, there is a project folder. I have made D as the owner of that folder and assigned 'admin' as the group using chgrp. Group and owners have all the…
Daud
  • 213
  • 1
  • 2
  • 7
10
votes
4 answers

When does chmod fail?

Under what circumstances will chmod fail? I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in. I'd assume chmod will work if: you're root you own the target file (and are…
Wug
  • 243
  • 1
  • 2
  • 8
10
votes
4 answers

How can I block a specific URL on a DD-WRT router?

I've been looking everywhere for this. Does anyone know how to block a specific URL on a DD-WRT router? For example, I want to block website.com/whatever but not website.com, blah.website.com, or website.com/blah. Is there a way to do this, or can…
Big McLargeHuge
  • 3,044
  • 11
  • 35
  • 49
9
votes
2 answers

Restrict particular applications from accessing certain files

Normally the private files stored in the home directory of a user can be accessed by applications running with the effective UID of the user. How can I restrict a particular application from accessing certain private files, while still allowing the…
isup
  • 99
  • 1
  • 2
8
votes
3 answers

Is there a tool that could allow the users of our scientific computer to book it exclusively?

We have one beefy ubuntu rig for our research department that can do heavy lifting with its CPUs and GPUs. All of our researchers SSH into the machine and run (machine learning) workloads on the system. The problem is that we are having collisions…
1
2 3
11 12