Giving a single user write permissions
I want to grant a single user write permissions to a directory owned by root over command line. With chmod, it seems that I can only change the permissions for owner, group and other, not for a specific user.
permissions users
add a comment |
I want to grant a single user write permissions to a directory owned by root over command line. With chmod, it seems that I can only change the permissions for owner, group and other, not for a specific user.
permissions users
add a comment |
I want to grant a single user write permissions to a directory owned by root over command line. With chmod, it seems that I can only change the permissions for owner, group and other, not for a specific user.
permissions users
I want to grant a single user write permissions to a directory owned by root over command line. With chmod, it seems that I can only change the permissions for owner, group and other, not for a specific user.
permissions users
permissions users
asked Sep 24 '11 at 22:22
HanneshHannesh
13313
13313
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
Remember to installacl
package.
– enzotib
Sep 25 '11 at 8:43
add a comment |
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f62868%2fgiving-a-single-user-write-permissions%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
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
Remember to installacl
package.
– enzotib
Sep 25 '11 at 8:43
add a comment |
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
Remember to installacl
package.
– enzotib
Sep 25 '11 at 8:43
add a comment |
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
edited Jan 22 at 12:43
Olorin
2,433822
2,433822
answered Sep 25 '11 at 6:25
Kees CookKees Cook
13.9k75791
13.9k75791
Remember to installacl
package.
– enzotib
Sep 25 '11 at 8:43
add a comment |
Remember to installacl
package.
– enzotib
Sep 25 '11 at 8:43
Remember to install
acl
package.– enzotib
Sep 25 '11 at 8:43
Remember to install
acl
package.– enzotib
Sep 25 '11 at 8:43
add a comment |
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.
add a comment |
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.
add a comment |
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.
answered Sep 24 '11 at 22:54
SergeySergey
36.5k98799
36.5k98799
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f62868%2fgiving-a-single-user-write-permissions%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