How do I display the owner, groups and permissions for a user in bash?
Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?
I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?
permissions users group accounts
add a comment |
Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?
I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?
permissions users group accounts
Owner group and permissions are associated with files, not users, so you probably want something likels -ld /home/guest
– thrig
Mar 21 '17 at 14:15
add a comment |
Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?
I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?
permissions users group accounts
Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?
I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?
permissions users group accounts
permissions users group accounts
edited Jan 13 at 21:19
Rui F Ribeiro
39.5k1479133
39.5k1479133
asked Mar 21 '17 at 0:09
JdubJdub
112
112
Owner group and permissions are associated with files, not users, so you probably want something likels -ld /home/guest
– thrig
Mar 21 '17 at 14:15
add a comment |
Owner group and permissions are associated with files, not users, so you probably want something likels -ld /home/guest
– thrig
Mar 21 '17 at 14:15
Owner group and permissions are associated with files, not users, so you probably want something like
ls -ld /home/guest
– thrig
Mar 21 '17 at 14:15
Owner group and permissions are associated with files, not users, so you probably want something like
ls -ld /home/guest
– thrig
Mar 21 '17 at 14:15
add a comment |
2 Answers
2
active
oldest
votes
Owner: None, users do not have owners.
Groups:
groups guest
Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):
users-admin
add a comment |
Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.
To show the permissions for files and directories:
ls -l <filename | directory>
To show the groups a user belongs to
groups <username>
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%2f352710%2fhow-do-i-display-the-owner-groups-and-permissions-for-a-user-in-bash%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
Owner: None, users do not have owners.
Groups:
groups guest
Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):
users-admin
add a comment |
Owner: None, users do not have owners.
Groups:
groups guest
Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):
users-admin
add a comment |
Owner: None, users do not have owners.
Groups:
groups guest
Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):
users-admin
Owner: None, users do not have owners.
Groups:
groups guest
Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):
users-admin
answered Mar 21 '17 at 0:20
agcagc
4,62811036
4,62811036
add a comment |
add a comment |
Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.
To show the permissions for files and directories:
ls -l <filename | directory>
To show the groups a user belongs to
groups <username>
add a comment |
Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.
To show the permissions for files and directories:
ls -l <filename | directory>
To show the groups a user belongs to
groups <username>
add a comment |
Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.
To show the permissions for files and directories:
ls -l <filename | directory>
To show the groups a user belongs to
groups <username>
Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.
To show the permissions for files and directories:
ls -l <filename | directory>
To show the groups a user belongs to
groups <username>
answered Mar 21 '17 at 0:20
Stephen RauchStephen Rauch
3,338101428
3,338101428
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%2f352710%2fhow-do-i-display-the-owner-groups-and-permissions-for-a-user-in-bash%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
Owner group and permissions are associated with files, not users, so you probably want something like
ls -ld /home/guest
– thrig
Mar 21 '17 at 14:15