Get the App
SLTechnology News&Howtos  ›  Servers  › 

Overwrite ownership and mode using linux's dpkg-statoverride command

Shulou Source: shulou.com Published: 2022-06-02 18:59:33 10月06日 Update

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.

Tags: Files commands permissions ownership patterns utilities parameters properties folders more articles software packages references good content functions examples utilities tools Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Shulou Information vpn Huawei