How to undo or set back to default chmod -R 755?

39,284

All of what you have is just change ownership of that directory back to your user.

sudo chown -R username:username /home/deepak/php/

So in your caser username=deep

sudo chown -R deep:deep /home/deepak/php/

And for the command2

sudo chmod -R 755 /home/deepak/php/     

this permission will be just fine for your now, but you probably change some permissions later if you face some problems

Share:
39,284

Related videos on Youtube

deepak yadav
Author by

deepak yadav

Updated on September 18, 2022

Comments

  • deepak yadav
    deepak yadav almost 2 years

    What I was trying to do is installing "wordpress" in my localhost on (ubuntu 14.04) i.e my path for localhost is " home/deepak/php "

    Now what i did is this in terminal:

    sudo chown -R www-data:www-data /home/deepak/php/
    sudo chmod -R 755 /home/deepak/php/              
    

    And now I can't create any folder or file in /home/deepak/php/

    PLEASE NOTE:All I want now is to undo and set back to earlier as it was, both of above the command 1 & command 2, I don't care any wordpress for now. just help me in undoing those 2 commands.

    • terdon
      terdon about 9 years
      @Maythux actually, don't bother. The OP has crossposted this on U&L and there's already an answer there. Let's just close this one.
    • deepak yadav
      deepak yadav about 9 years
      That's it? my username is deep. that means sudo chown -R deep:deep /home/deepak/php will do?
    • deepak yadav
      deepak yadav about 9 years
      yeah y not your are not suffering because of that right?
    • terdon
      terdon about 9 years
      @deepakyadav cross-posting is not allowed on the Stack Exchange network. It leads to duplicated effort which is precisely what just happened here. Please choose one site and only ask there. So, please accept one of the answers, either here or on U&L and then delete your other question.
    • deepak yadav
      deepak yadav about 9 years
      so how do i delete question on other site. this site is more relevant to me.
    • Maythux
      Maythux about 9 years
      @deepakyadav You are welcome, if it helps you then consider to mark as answer. take a look to askubuntu.com/tour
    • terdon
      terdon about 9 years
      @deepakyadav I'll close the other one then. Please don't do this again, as you see it leads to complications. I voted to close this one since your other Q already had an answer. If you prefer to keep this one, I will close the other.
    • deepak yadav
      deepak yadav about 9 years
      @terdon ok, close the other one i'm only on askubuntu, i landed up there unknowingly. thanks for your help to.