Change ownership of linux directory
Hi I'm very new to Linux..
Once I have changed ownership of /usr
my sudo
command failed working ..
Once I changed ownership of /var
some other things broke ..
1: I just want to know which are folders where one should never change it's default ownership..
2: what if someone gets permission_denied
for /var
during installing some packages .. chmod
or chown
should be used ...
linux ubuntu-16.04
add a comment |
Hi I'm very new to Linux..
Once I have changed ownership of /usr
my sudo
command failed working ..
Once I changed ownership of /var
some other things broke ..
1: I just want to know which are folders where one should never change it's default ownership..
2: what if someone gets permission_denied
for /var
during installing some packages .. chmod
or chown
should be used ...
linux ubuntu-16.04
1
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, soroot
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of thesudo
utility.
– arkascha
Nov 21 '18 at 12:56
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34
add a comment |
Hi I'm very new to Linux..
Once I have changed ownership of /usr
my sudo
command failed working ..
Once I changed ownership of /var
some other things broke ..
1: I just want to know which are folders where one should never change it's default ownership..
2: what if someone gets permission_denied
for /var
during installing some packages .. chmod
or chown
should be used ...
linux ubuntu-16.04
Hi I'm very new to Linux..
Once I have changed ownership of /usr
my sudo
command failed working ..
Once I changed ownership of /var
some other things broke ..
1: I just want to know which are folders where one should never change it's default ownership..
2: what if someone gets permission_denied
for /var
during installing some packages .. chmod
or chown
should be used ...
linux ubuntu-16.04
linux ubuntu-16.04
asked Nov 21 '18 at 12:50
shaanshaan
1357
1357
1
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, soroot
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of thesudo
utility.
– arkascha
Nov 21 '18 at 12:56
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34
add a comment |
1
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, soroot
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of thesudo
utility.
– arkascha
Nov 21 '18 at 12:56
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34
1
1
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, so
root
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of the sudo
utility.– arkascha
Nov 21 '18 at 12:56
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, so
root
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of the sudo
utility.– arkascha
Nov 21 '18 at 12:56
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34
add a comment |
1 Answer
1
active
oldest
votes
I would never change the ownership in folders unlike /home/* /opt/. Sometimes you have to change the owner if you put your own stuff to /etc/, but you should now what to do.
To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.
# f.e. installation of a command line browser
sudo apt install w3m
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f53412432%2fchange-ownership-of-linux-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would never change the ownership in folders unlike /home/* /opt/. Sometimes you have to change the owner if you put your own stuff to /etc/, but you should now what to do.
To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.
# f.e. installation of a command line browser
sudo apt install w3m
add a comment |
I would never change the ownership in folders unlike /home/* /opt/. Sometimes you have to change the owner if you put your own stuff to /etc/, but you should now what to do.
To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.
# f.e. installation of a command line browser
sudo apt install w3m
add a comment |
I would never change the ownership in folders unlike /home/* /opt/. Sometimes you have to change the owner if you put your own stuff to /etc/, but you should now what to do.
To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.
# f.e. installation of a command line browser
sudo apt install w3m
I would never change the ownership in folders unlike /home/* /opt/. Sometimes you have to change the owner if you put your own stuff to /etc/, but you should now what to do.
To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.
# f.e. installation of a command line browser
sudo apt install w3m
answered Nov 21 '18 at 12:59


OkieOthOkieOth
2,1231218
2,1231218
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53412432%2fchange-ownership-of-linux-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
1
You should actually never change the file ownership of system resources.
– arkascha
Nov 21 '18 at 12:53
As a rule of thumb, don't mess with the permissions of files and directories installed by the OS and package manager.
– Shawn
Nov 21 '18 at 12:54
If someone wants to store a file to a location where the permission is denied, then you should think the other way 'round: why is permission denied. The answer is not "because of file ownerships", but "because that is not where that user is meant to write to". Installation of things into a system should only be done by the system administration account, so
root
. Everyone else needs to either use the private "home" folder each account has (that is what that account actually is for), or he needs to assume another user role, for example by means of thesudo
utility.– arkascha
Nov 21 '18 at 12:56
I'm voting to close this question as off-topic because it has nothing to do with programming and belongs over at unix.stackexchange.com/questions/tagged/linux or superuser.com/questions/tagged/linux
– tink
Nov 21 '18 at 16:34