How to give a user x full access to a directory?How to give a specific user access only to a specific folder and its contents?Granting access to a file or directory to another user but not all usersGive a user read access to a directory without making them ownerGive access to only specific directory for a sudo userSpecial directory permissions for new user
Can you upgrade armour from breastplate to halfplate?
Can we not simply connect a battery to a RAM to prevent data loss during power cuts?
Why do adjectives come before nouns in English?
Neither Raman nor IR Active vibrational modes
What‘s wrong with my proof of the Law of Total Variance?
Does an excessive table violate normalization rules?
"inuendo" in a piano score
Incorrect mmap behavior when assembly files included in the project
Why does b+=(4,) work and b = b + (4,) doesn't work when b is a list?
Dice? = Is that so?
How should the 23rd judge vote?
Is it possible to unmount a partition table?
How to prove that invoices are really UNPAID?
How to plot two axis bar chart side by side
What does "stirring tanks" mean?
My Villain scrys on the party, but I forgot about the sensor!
How can a "proper" function have a vertical slope?
Why does Sonny say they call Michael "Giogali"?
When did MCMC become commonplace?
Is it now possible to undetectably cross the Arctic Ocean on ski/kayak?
What is the design rationale for having armor and magic penetration mechanics?
Will Schnorr Multi-signatures completely replace ECDSA?
Is it possible to have 2 ports open on SSH with 2 different authentication schemes?
Front hydraulic disk brake is too powerful on MTB — solutions?
How to give a user x full access to a directory?
How to give a specific user access only to a specific folder and its contents?Granting access to a file or directory to another user but not all usersGive a user read access to a directory without making them ownerGive access to only specific directory for a sudo userSpecial directory permissions for new user
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
In Ubuntu 18.04, how can I give a user x
a full access (read/write/execute) to a directory and all its content?
18.04 permissions filesystem directory
add a comment
|
In Ubuntu 18.04, how can I give a user x
a full access (read/write/execute) to a directory and all its content?
18.04 permissions filesystem directory
add a comment
|
In Ubuntu 18.04, how can I give a user x
a full access (read/write/execute) to a directory and all its content?
18.04 permissions filesystem directory
In Ubuntu 18.04, how can I give a user x
a full access (read/write/execute) to a directory and all its content?
18.04 permissions filesystem directory
18.04 permissions filesystem directory
edited May 4 at 17:43
Kulfy
8,14010 gold badges32 silver badges60 bronze badges
8,14010 gold badges32 silver badges60 bronze badges
asked May 4 at 15:31
user9371654user9371654
2375 silver badges17 bronze badges
2375 silver badges17 bronze badges
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
It would help if you give a little more information about what exactly you are trying to do, but...
Ubuntu by default uses Owner-Group-All permissions. I am assuming that you want "User-X" to have access to a directory that it owned by "User-Y"
First, Create a group for "User-X" and "User-Y", and add those users to the group - replace <userGroupName>
with a name that makes sense to you
sudo groupadd <userGroupName>
sudo usermod -a -G <userGroupName> User-X
sudo usermod -a -G <userGroupName> User-Y
Secondly, change the group ownership of the directory in question
sudo chown User-Y:<userGroupName> <directoryName>
Where <directoryName>
is the directory that you are working upon
Finally, change permissions at the directory to allow the owning group, (<userGroupName>
), appropriate permissions.
sudo chmod g+rwx <directoryName>
If the group is non-empty, you may wish to change the permissions of all files and folders in the directory:
sudo chmod g+rwx -R <directoryName>
add a comment
|
You can use the -R
(recursive) option to the chown
and chmod
commands, for example you could do something like this:
chown -R x directoryname
chmod -R u+rwx directoryname
The chown -R
command then sets the user x as the owner of that directory and everything inside. The chmod -R u+rwx
command grants the owner read, write, and execute permission for that directory and everything inside.
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/4.0/"u003ecc by-sa 4.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%2f1140527%2fhow-to-give-a-user-x-full-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
It would help if you give a little more information about what exactly you are trying to do, but...
Ubuntu by default uses Owner-Group-All permissions. I am assuming that you want "User-X" to have access to a directory that it owned by "User-Y"
First, Create a group for "User-X" and "User-Y", and add those users to the group - replace <userGroupName>
with a name that makes sense to you
sudo groupadd <userGroupName>
sudo usermod -a -G <userGroupName> User-X
sudo usermod -a -G <userGroupName> User-Y
Secondly, change the group ownership of the directory in question
sudo chown User-Y:<userGroupName> <directoryName>
Where <directoryName>
is the directory that you are working upon
Finally, change permissions at the directory to allow the owning group, (<userGroupName>
), appropriate permissions.
sudo chmod g+rwx <directoryName>
If the group is non-empty, you may wish to change the permissions of all files and folders in the directory:
sudo chmod g+rwx -R <directoryName>
add a comment
|
It would help if you give a little more information about what exactly you are trying to do, but...
Ubuntu by default uses Owner-Group-All permissions. I am assuming that you want "User-X" to have access to a directory that it owned by "User-Y"
First, Create a group for "User-X" and "User-Y", and add those users to the group - replace <userGroupName>
with a name that makes sense to you
sudo groupadd <userGroupName>
sudo usermod -a -G <userGroupName> User-X
sudo usermod -a -G <userGroupName> User-Y
Secondly, change the group ownership of the directory in question
sudo chown User-Y:<userGroupName> <directoryName>
Where <directoryName>
is the directory that you are working upon
Finally, change permissions at the directory to allow the owning group, (<userGroupName>
), appropriate permissions.
sudo chmod g+rwx <directoryName>
If the group is non-empty, you may wish to change the permissions of all files and folders in the directory:
sudo chmod g+rwx -R <directoryName>
add a comment
|
It would help if you give a little more information about what exactly you are trying to do, but...
Ubuntu by default uses Owner-Group-All permissions. I am assuming that you want "User-X" to have access to a directory that it owned by "User-Y"
First, Create a group for "User-X" and "User-Y", and add those users to the group - replace <userGroupName>
with a name that makes sense to you
sudo groupadd <userGroupName>
sudo usermod -a -G <userGroupName> User-X
sudo usermod -a -G <userGroupName> User-Y
Secondly, change the group ownership of the directory in question
sudo chown User-Y:<userGroupName> <directoryName>
Where <directoryName>
is the directory that you are working upon
Finally, change permissions at the directory to allow the owning group, (<userGroupName>
), appropriate permissions.
sudo chmod g+rwx <directoryName>
If the group is non-empty, you may wish to change the permissions of all files and folders in the directory:
sudo chmod g+rwx -R <directoryName>
It would help if you give a little more information about what exactly you are trying to do, but...
Ubuntu by default uses Owner-Group-All permissions. I am assuming that you want "User-X" to have access to a directory that it owned by "User-Y"
First, Create a group for "User-X" and "User-Y", and add those users to the group - replace <userGroupName>
with a name that makes sense to you
sudo groupadd <userGroupName>
sudo usermod -a -G <userGroupName> User-X
sudo usermod -a -G <userGroupName> User-Y
Secondly, change the group ownership of the directory in question
sudo chown User-Y:<userGroupName> <directoryName>
Where <directoryName>
is the directory that you are working upon
Finally, change permissions at the directory to allow the owning group, (<userGroupName>
), appropriate permissions.
sudo chmod g+rwx <directoryName>
If the group is non-empty, you may wish to change the permissions of all files and folders in the directory:
sudo chmod g+rwx -R <directoryName>
answered May 4 at 16:18
Charles GreenCharles Green
15.6k7 gold badges42 silver badges64 bronze badges
15.6k7 gold badges42 silver badges64 bronze badges
add a comment
|
add a comment
|
You can use the -R
(recursive) option to the chown
and chmod
commands, for example you could do something like this:
chown -R x directoryname
chmod -R u+rwx directoryname
The chown -R
command then sets the user x as the owner of that directory and everything inside. The chmod -R u+rwx
command grants the owner read, write, and execute permission for that directory and everything inside.
add a comment
|
You can use the -R
(recursive) option to the chown
and chmod
commands, for example you could do something like this:
chown -R x directoryname
chmod -R u+rwx directoryname
The chown -R
command then sets the user x as the owner of that directory and everything inside. The chmod -R u+rwx
command grants the owner read, write, and execute permission for that directory and everything inside.
add a comment
|
You can use the -R
(recursive) option to the chown
and chmod
commands, for example you could do something like this:
chown -R x directoryname
chmod -R u+rwx directoryname
The chown -R
command then sets the user x as the owner of that directory and everything inside. The chmod -R u+rwx
command grants the owner read, write, and execute permission for that directory and everything inside.
You can use the -R
(recursive) option to the chown
and chmod
commands, for example you could do something like this:
chown -R x directoryname
chmod -R u+rwx directoryname
The chown -R
command then sets the user x as the owner of that directory and everything inside. The chmod -R u+rwx
command grants the owner read, write, and execute permission for that directory and everything inside.
answered May 4 at 16:10
EliasElias
6052 silver badges14 bronze badges
6052 silver badges14 bronze badges
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%2f1140527%2fhow-to-give-a-user-x-full-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