LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-08-2020, 12:00 PM   #1
aalborz20
LQ Newbie
 
Registered: Oct 2020
Posts: 2

Rep: Reputation: Disabled
Question 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?
 
Old 10-08-2020, 09:30 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.
 
1 members found this post helpful.
Old 10-08-2020, 09:36 PM   #3
aalborz20
LQ Newbie
 
Registered: Oct 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Is the POSIX permission system the same as Linux?
 
Old 10-08-2020, 09:48 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by aalborz20 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between UID and effective UID chakribobby Linux - Newbie 2 10-23-2007 10:56 AM
Effective UID and real UID Milosevic Linux - General 1 01-06-2007 03:01 PM
Effective UID and Real UID Milosevic Linux - Newbie 1 01-06-2007 10:41 AM
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 02:34 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration