change ownership of all files from root to user












4














i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all files.










share|improve this question




















  • 1




    If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
    – TheWanderer
    May 15 '15 at 1:14






  • 1




    Really bad things will happen if you do this.
    – Marc
    May 15 '15 at 1:28
















4














i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all files.










share|improve this question




















  • 1




    If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
    – TheWanderer
    May 15 '15 at 1:14






  • 1




    Really bad things will happen if you do this.
    – Marc
    May 15 '15 at 1:28














4












4








4


4





i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all files.










share|improve this question















i'm new to Ubuntu and was wondering if there is a way to remove the ownership of all files and scripts from root to user even if i have to re-install Ubuntu?
i do know about the command 'chown -v username foldername', although it doesn't work on all files.







chown ownership






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 15 '15 at 3:52









walttheboss

1067




1067










asked May 15 '15 at 1:08









rgr

379269




379269








  • 1




    If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
    – TheWanderer
    May 15 '15 at 1:14






  • 1




    Really bad things will happen if you do this.
    – Marc
    May 15 '15 at 1:28














  • 1




    If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
    – TheWanderer
    May 15 '15 at 1:14






  • 1




    Really bad things will happen if you do this.
    – Marc
    May 15 '15 at 1:28








1




1




If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
– TheWanderer
May 15 '15 at 1:14




If you take away root ownership of some files, Ubuntu will stop working. Why would you want to do this?
– TheWanderer
May 15 '15 at 1:14




1




1




Really bad things will happen if you do this.
– Marc
May 15 '15 at 1:28




Really bad things will happen if you do this.
– Marc
May 15 '15 at 1:28










2 Answers
2






active

oldest

votes


















8














Just go to the directory you want to change:



cd /opt/lampp/htdocs


and change the permission using the chown command:



sudo chown userName -R codeigniter


Where userName is the username and codeigniter is the folder's name.






share|improve this answer



















  • 1




    @spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
    – Fabby
    Jan 21 '17 at 8:41






  • 1




    @Fabby Yes of course, I will.
    – pa4080
    Jan 21 '17 at 8:46










  • Sure.But the Answer will not be helpfull for new users.
    – Saad Mirza
    Jan 21 '17 at 11:04



















2














When you do an install you have several directories. Everything in /home/user/ can be changed to your user. If you chown the others your system will break. And when you chown you need to make sure you chown to the user and NOT just some name you choose. It will be the same name as the folder under /home/. Do not change either permissions or ownership of anything but files under /home/user/.



sudo chown -v -R user:user /home/user/


The command will change the user and the group to the same at the same time.






share|improve this answer



















  • 3




    And all files become executable permissions? sorry, that's a -1
    – A.B.
    May 15 '15 at 10:28











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f623864%2fchange-ownership-of-all-files-from-root-to-user%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









8














Just go to the directory you want to change:



cd /opt/lampp/htdocs


and change the permission using the chown command:



sudo chown userName -R codeigniter


Where userName is the username and codeigniter is the folder's name.






share|improve this answer



















  • 1




    @spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
    – Fabby
    Jan 21 '17 at 8:41






  • 1




    @Fabby Yes of course, I will.
    – pa4080
    Jan 21 '17 at 8:46










  • Sure.But the Answer will not be helpfull for new users.
    – Saad Mirza
    Jan 21 '17 at 11:04
















8














Just go to the directory you want to change:



cd /opt/lampp/htdocs


and change the permission using the chown command:



sudo chown userName -R codeigniter


Where userName is the username and codeigniter is the folder's name.






share|improve this answer



















  • 1




    @spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
    – Fabby
    Jan 21 '17 at 8:41






  • 1




    @Fabby Yes of course, I will.
    – pa4080
    Jan 21 '17 at 8:46










  • Sure.But the Answer will not be helpfull for new users.
    – Saad Mirza
    Jan 21 '17 at 11:04














8












8








8






Just go to the directory you want to change:



cd /opt/lampp/htdocs


and change the permission using the chown command:



sudo chown userName -R codeigniter


Where userName is the username and codeigniter is the folder's name.






share|improve this answer














Just go to the directory you want to change:



cd /opt/lampp/htdocs


and change the permission using the chown command:



sudo chown userName -R codeigniter


Where userName is the username and codeigniter is the folder's name.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday









gavin

33




33










answered Jan 21 '17 at 7:29









Saad Mirza

97125




97125








  • 1




    @spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
    – Fabby
    Jan 21 '17 at 8:41






  • 1




    @Fabby Yes of course, I will.
    – pa4080
    Jan 21 '17 at 8:46










  • Sure.But the Answer will not be helpfull for new users.
    – Saad Mirza
    Jan 21 '17 at 11:04














  • 1




    @spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
    – Fabby
    Jan 21 '17 at 8:41






  • 1




    @Fabby Yes of course, I will.
    – pa4080
    Jan 21 '17 at 8:46










  • Sure.But the Answer will not be helpfull for new users.
    – Saad Mirza
    Jan 21 '17 at 11:04








1




1




@spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
– Fabby
Jan 21 '17 at 8:41




@spasSpasov: Could you please review my edits and also review the editing help to improve the readability of your own edits in the future... ;-)
– Fabby
Jan 21 '17 at 8:41




1




1




@Fabby Yes of course, I will.
– pa4080
Jan 21 '17 at 8:46




@Fabby Yes of course, I will.
– pa4080
Jan 21 '17 at 8:46












Sure.But the Answer will not be helpfull for new users.
– Saad Mirza
Jan 21 '17 at 11:04




Sure.But the Answer will not be helpfull for new users.
– Saad Mirza
Jan 21 '17 at 11:04













2














When you do an install you have several directories. Everything in /home/user/ can be changed to your user. If you chown the others your system will break. And when you chown you need to make sure you chown to the user and NOT just some name you choose. It will be the same name as the folder under /home/. Do not change either permissions or ownership of anything but files under /home/user/.



sudo chown -v -R user:user /home/user/


The command will change the user and the group to the same at the same time.






share|improve this answer



















  • 3




    And all files become executable permissions? sorry, that's a -1
    – A.B.
    May 15 '15 at 10:28
















2














When you do an install you have several directories. Everything in /home/user/ can be changed to your user. If you chown the others your system will break. And when you chown you need to make sure you chown to the user and NOT just some name you choose. It will be the same name as the folder under /home/. Do not change either permissions or ownership of anything but files under /home/user/.



sudo chown -v -R user:user /home/user/


The command will change the user and the group to the same at the same time.






share|improve this answer



















  • 3




    And all files become executable permissions? sorry, that's a -1
    – A.B.
    May 15 '15 at 10:28














2












2








2






When you do an install you have several directories. Everything in /home/user/ can be changed to your user. If you chown the others your system will break. And when you chown you need to make sure you chown to the user and NOT just some name you choose. It will be the same name as the folder under /home/. Do not change either permissions or ownership of anything but files under /home/user/.



sudo chown -v -R user:user /home/user/


The command will change the user and the group to the same at the same time.






share|improve this answer














When you do an install you have several directories. Everything in /home/user/ can be changed to your user. If you chown the others your system will break. And when you chown you need to make sure you chown to the user and NOT just some name you choose. It will be the same name as the folder under /home/. Do not change either permissions or ownership of anything but files under /home/user/.



sudo chown -v -R user:user /home/user/


The command will change the user and the group to the same at the same time.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 20 '15 at 5:13









Thomas Ward

43.5k23120172




43.5k23120172










answered May 15 '15 at 1:28









walttheboss

1067




1067








  • 3




    And all files become executable permissions? sorry, that's a -1
    – A.B.
    May 15 '15 at 10:28














  • 3




    And all files become executable permissions? sorry, that's a -1
    – A.B.
    May 15 '15 at 10:28








3




3




And all files become executable permissions? sorry, that's a -1
– A.B.
May 15 '15 at 10:28




And all files become executable permissions? sorry, that's a -1
– A.B.
May 15 '15 at 10:28


















draft saved

draft discarded




















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f623864%2fchange-ownership-of-all-files-from-root-to-user%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀