F
F
Free0wl2020-12-25 10:13:01
linux
Free0wl, 2020-12-25 10:13:01

How to copy permissions and owner from one directory to another?

The essence of the problem: access rights and the owner of the /usr directory and its subdirectories have been lost
Question: can I restore it? for example, copy ONLY the rights and the owner from another similar PC, with a similar OS (Linux Mageia).

Thanks in advance!!!
PS Interested in answers with solutions, and not with comments "how it happened" and so on ...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Adamos, 2020-12-25
@Adamos

As for the user - start with find /usr \! -user root
I got only three lines of such.
As for the rights, I think it's similar - in the mass the same, exceptions are found by find -perm (separately for folders and files).

O
Oleg Volkov, 2020-12-25
@voleg4u

As far as I understand, your linux is based on rpm.
# rpm -a -V
will show you the wrong files. By the way, it might be easier to reinstall broken rpm.

Z
zergon321, 2017-02-17
@zergon321

To you to advise against a DBMS? It already depends then on the scale of the enterprise. And yes, graphic files can be saved in the database using binary data types, but there is a limited size, you will have to make text columns indicating the full paths to the files. Do you really need it?

M
Matvey Rumynin, 2018-12-10
@greenkey

google firebase if free

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question