R
R
Rokis2018-06-24 18:36:19
Access rights
Rokis, 2018-06-24 18:36:19

How to return the correct rights to the folders and directories of the server?

Hello.
The situation is this:
I wanted to set the rights for the new site on Wordpress. I copied the command and pasted it into the console without going to the folder with the site . They are automatically completed...

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +

Any advice on how to fix the situation?
Where to hide in the first place according to the standard?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2018-06-24
@SagePtr

What folder were you in when you ran these commands? By default, if you open the console and do not go anywhere, you will end up in the user's home directory, you can change anything inside

R
Roman Mirilaczvili, 2018-06-24
@2ord

Options:
1. Save important data, reinstall OS from scratch and restore data.
2. Install the OS from scratch on a virtual machine separately with the same set of packages, go through all the folders and save their access rights to some file, then apply the rights from the file on the damaged system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question