0

This question already has an answer here:

I try to change folder permission. But it went wrong and mess up with all permission like this

http://i.stack.imgur.com/4hJaE.png

I tried

sudo chown -R root:root /var/www/html/

but nothing changed.

How can I revert back the permission or change owner ?

Note: I cannot add image direct to here due to insufficient reputation.

marked as duplicate by Anwar, Eric Carvalho, edwinksl, Pilot6, Luís de Sousa Aug 12 '16 at 12:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Ownership changed to root. But access set none. I want to revert back root access as read & write.. – Naga Aug 10 '16 at 2:53
1

The command you used gave ownership to the root user and group. According to the image, it's done. The only thing that probably needs to be changed is the access permission for the root user which now is none. You can change it by typing:

sudo chmod u+rw /var/www/html

  • I tried this but unfortunately, I am unable to create a new file or directory. It throws permission denied error. – Shameerariff Oct 16 '17 at 16:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.