How to list all the users that have access to a directory?
Clash Royale CLAN TAG#URR8PPP
When I do ls -al
, I see that "users" have access to a particular directory. How do I see what users have what access to these directories?
$ls -al
drwxrwxrwt 7 root root 4096 Mar 9 23:37 .
drwxr-xr-x 5 root root 4096 Feb 22 14:28 ..
drwxrwxrwx 65 myname users 4096 Feb 22 20:08 tools
-rwxr-xr-x 1 myname users 3832976 Jan 27 13:39 pfiles
drwxr-xr-x 2 myname users 4096 Jan 23 07:57 nfiles
drwxr-xr-x 4 myname users 4096 Aug 1 2014 dfiles
linux permissions
add a comment |
When I do ls -al
, I see that "users" have access to a particular directory. How do I see what users have what access to these directories?
$ls -al
drwxrwxrwt 7 root root 4096 Mar 9 23:37 .
drwxr-xr-x 5 root root 4096 Feb 22 14:28 ..
drwxrwxrwx 65 myname users 4096 Feb 22 20:08 tools
-rwxr-xr-x 1 myname users 3832976 Jan 27 13:39 pfiles
drwxr-xr-x 2 myname users 4096 Jan 23 07:57 nfiles
drwxr-xr-x 4 myname users 4096 Aug 1 2014 dfiles
linux permissions
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24
add a comment |
When I do ls -al
, I see that "users" have access to a particular directory. How do I see what users have what access to these directories?
$ls -al
drwxrwxrwt 7 root root 4096 Mar 9 23:37 .
drwxr-xr-x 5 root root 4096 Feb 22 14:28 ..
drwxrwxrwx 65 myname users 4096 Feb 22 20:08 tools
-rwxr-xr-x 1 myname users 3832976 Jan 27 13:39 pfiles
drwxr-xr-x 2 myname users 4096 Jan 23 07:57 nfiles
drwxr-xr-x 4 myname users 4096 Aug 1 2014 dfiles
linux permissions
When I do ls -al
, I see that "users" have access to a particular directory. How do I see what users have what access to these directories?
$ls -al
drwxrwxrwt 7 root root 4096 Mar 9 23:37 .
drwxr-xr-x 5 root root 4096 Feb 22 14:28 ..
drwxrwxrwx 65 myname users 4096 Feb 22 20:08 tools
-rwxr-xr-x 1 myname users 3832976 Jan 27 13:39 pfiles
drwxr-xr-x 2 myname users 4096 Jan 23 07:57 nfiles
drwxr-xr-x 4 myname users 4096 Aug 1 2014 dfiles
linux permissions
linux permissions
edited Dec 15 '18 at 16:38
Rui F Ribeiro
40.9k1479137
40.9k1479137
asked Mar 19 '17 at 8:25
ajyajy
13113
13113
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24
add a comment |
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24
add a comment |
2 Answers
2
active
oldest
votes
users
is a group, so the members of that group and all of the other groups is available in /etc/group
.
The ArchWiki has an excellent page on file permissions and attributes.
Groupusers
is not in the file.cat /etc/group | grep users
doesn't return anything. Any idea why?
– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed ingroup
(butusers
should still be in it).
– Michael Homer
Mar 19 '17 at 9:07
1
the group entries could be in elsewhere, such as NIS or LDAP; usegetent group users
as Tagar did
– Jeff Schaller
Feb 10 at 1:23
add a comment |
To get list of users in users
group, you could use following command:
$ getent group users
users:x:1021:ken,ben,dan
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f352415%2fhow-to-list-all-the-users-that-have-access-to-a-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
users
is a group, so the members of that group and all of the other groups is available in /etc/group
.
The ArchWiki has an excellent page on file permissions and attributes.
Groupusers
is not in the file.cat /etc/group | grep users
doesn't return anything. Any idea why?
– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed ingroup
(butusers
should still be in it).
– Michael Homer
Mar 19 '17 at 9:07
1
the group entries could be in elsewhere, such as NIS or LDAP; usegetent group users
as Tagar did
– Jeff Schaller
Feb 10 at 1:23
add a comment |
users
is a group, so the members of that group and all of the other groups is available in /etc/group
.
The ArchWiki has an excellent page on file permissions and attributes.
Groupusers
is not in the file.cat /etc/group | grep users
doesn't return anything. Any idea why?
– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed ingroup
(butusers
should still be in it).
– Michael Homer
Mar 19 '17 at 9:07
1
the group entries could be in elsewhere, such as NIS or LDAP; usegetent group users
as Tagar did
– Jeff Schaller
Feb 10 at 1:23
add a comment |
users
is a group, so the members of that group and all of the other groups is available in /etc/group
.
The ArchWiki has an excellent page on file permissions and attributes.
users
is a group, so the members of that group and all of the other groups is available in /etc/group
.
The ArchWiki has an excellent page on file permissions and attributes.
edited Mar 19 '17 at 16:02
Pro Backup
2,10863258
2,10863258
answered Mar 19 '17 at 8:29
Kenneth B. JensenKenneth B. Jensen
57839
57839
Groupusers
is not in the file.cat /etc/group | grep users
doesn't return anything. Any idea why?
– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed ingroup
(butusers
should still be in it).
– Michael Homer
Mar 19 '17 at 9:07
1
the group entries could be in elsewhere, such as NIS or LDAP; usegetent group users
as Tagar did
– Jeff Schaller
Feb 10 at 1:23
add a comment |
Groupusers
is not in the file.cat /etc/group | grep users
doesn't return anything. Any idea why?
– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed ingroup
(butusers
should still be in it).
– Michael Homer
Mar 19 '17 at 9:07
1
the group entries could be in elsewhere, such as NIS or LDAP; usegetent group users
as Tagar did
– Jeff Schaller
Feb 10 at 1:23
Group
users
is not in the file. cat /etc/group | grep users
doesn't return anything. Any idea why?– ajy
Mar 19 '17 at 8:44
Group
users
is not in the file. cat /etc/group | grep users
doesn't return anything. Any idea why?– ajy
Mar 19 '17 at 8:44
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Strange, "users" should be an invalid group, then, and the GID would be shown instead of the name. Which distribution are you on?
– Kenneth B. Jensen
Mar 19 '17 at 8:52
Only non-primary group memberships are listed in
group
(but users
should still be in it).– Michael Homer
Mar 19 '17 at 9:07
Only non-primary group memberships are listed in
group
(but users
should still be in it).– Michael Homer
Mar 19 '17 at 9:07
1
1
the group entries could be in elsewhere, such as NIS or LDAP; use
getent group users
as Tagar did– Jeff Schaller
Feb 10 at 1:23
the group entries could be in elsewhere, such as NIS or LDAP; use
getent group users
as Tagar did– Jeff Schaller
Feb 10 at 1:23
add a comment |
To get list of users in users
group, you could use following command:
$ getent group users
users:x:1021:ken,ben,dan
add a comment |
To get list of users in users
group, you could use following command:
$ getent group users
users:x:1021:ken,ben,dan
add a comment |
To get list of users in users
group, you could use following command:
$ getent group users
users:x:1021:ken,ben,dan
To get list of users in users
group, you could use following command:
$ getent group users
users:x:1021:ken,ben,dan
answered Feb 9 at 20:48
TagarTagar
1786
1786
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f352415%2fhow-to-list-all-the-users-that-have-access-to-a-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
when you set the linux permissions like your example. Others can read/execute your directory.Because your linux permissions setting was rwx - rx -rx or 755.
– supriady
Mar 19 '17 at 8:39
to put a finer point on what supriady said, everyone that can log in to the system can see those files/directories (assuming they can get to the parent directory).
– Jeff Schaller
Feb 10 at 1:24