Overwrite ownership and mode using linux's dpkg-statoverride command
This article will explain in detail about using linux's dpkg-statoverride command to rewrite ownership and mode. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The dpkg-statoverride command is a utility for rewriting the status of a software package under Debian linux. The dpkg-statoverride command has three basic functions, namely, add, delete, and display the overwrite list.
After removing the overwrite using the dpkg-statoverride command, if you want to restore the old permissions, you need to manually set the permissions or reinstall the package that contains the file.
Syntax format: dpkg-statoverride [parameters]
Common parameters:
-add adds an overwrite to the file-remove deletes an overwrite for the file-list displays a list of all overwrites-update if the file exists, perform an overwrite operation immediately
Reference example
Displays the current list of all overrides:
[root@linuxcool] # dpkg-statoverride-- list
Modify the permission properties of the folder:
[root@linuxcool] # dpkg-statoverride-- update-- add nagios nagios 751 / var/lib/nagios3
Force the permission properties of the folder to be modified:
[root@linuxcool] # dpkg-statoverride-- force-- update-- add root sasl 755 / var/spool/postfix/var/run/saslauthd
Delete the file from the database:
[root@linuxcool ~] # dpkg-statoverride-- remove / usr/bin/wall about using linux's dpkg-statoverride command to rewrite ownership and mode is shared here. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.