LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   UID Permission Question (https://www.linuxquestions.org/questions/linux-security-4/uid-permission-question-4175683353/)

aalborz20 10-08-2020 12:00 PM

UID Permission Question
 
I have a file that I want to allow other users to read, only if their user’s ID is less than 1000. How would I do this?

berndbausch 10-08-2020 09:30 PM

UIDs in the POSIX permission system are scalar values, not ranges. Same for file ACLs. There is no concept of rules like "UID<1000".

To solve your problem, you could add all users with UID<1000 to a particular group and give that group read permission via the normal POSIX scheme or ACLs.

aalborz20 10-08-2020 09:36 PM

Is the POSIX permission system the same as Linux?

berndbausch 10-08-2020 09:48 PM

Quote:

Originally Posted by aalborz20 (Post 6173842)
Is the POSIX permission system the same as Linux?

GNU uses the POSIX permission system, perhaps with some extensions. See https://www.gnu.org/software/coreuti...rmissions.html.


All times are GMT -5. The time now is 01:03 AM.