4

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.

9
  • just chown again to your username. sudo chown -R username:username /home/deepak/php/
    – Maythux
    Jun 26, 2015 at 9:18
  • @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.
    – terdon
    Jun 26, 2015 at 9:29
  • That's it? my username is deep. that means sudo chown -R deep:deep /home/deepak/php will do? Jun 26, 2015 at 9:29
  • yeah y not your are not suffering because of that right? Jun 26, 2015 at 9:31
  • @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.
    – terdon
    Jun 26, 2015 at 9:32

1 Answer 1

10

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

Not the answer you're looking for? Browse other questions tagged .