防止 RPM 更改目录权限

发布于 2024-12-07 04:26:01 字数 322 浏览 3 评论 0原文

更新完成后是否可以阻止 RPM 更改目录的权限。即我们有一些应用程序正常工作所需的目录。但是,用户还可能使用其他应用程序添加更多功能,为此需要在安装后更改这些目录的权限。但是,如果我们的应用程序随后更新,则会将这些目录的权限更改回安装后的权限。

有没有办法更改规范文件,以便在更新后保留这些权限?目前我们遵循的路线是,我们从 rpm 中排除这些目录,因此它们不会发生更改(但在新安装完成时也不会创建)。有没有更好的方法来处理这个问题?

此外,在一种情况下,有问题的目录稍后会被其他目录的符号链接替换。然后,符号链接权限的更改会传播到真实目录。这是否需要与上述不同的设置,或者相同的解决方案仍然有效?

is it possible to keep RPM from changing the permissions of a directory when an update is done. I.e. we have some directories that are needed for the application to work correctly. However the user might also add some more features using other applications and for this needs to change the permissions on these directories after the installation. However if our Application is then updated, it changes the permissions on these directories back to the ones they have after installation.

Is there any way to change the spec file, so that these permissions will be kept after an update? Currently we are following the route, that we excluded these directories from the rpm, so they do not get changed (but also will not be created when a new installation is done). Is there any better way to handle this?

Also in one case the directories in questions are later replaced by symlinks to other directories. The change in permission on the symlinks then propagates to the real directories. Would this need a different setup than the one above, or would the same solution still work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

病女 2024-12-14 04:26:01

仅在安装期间创建目录。升级时跳过它。 RPM 在安装期间将 $1 设置为 1,在升级期间将 $1 设置为 2。

Create the directories only during installation. Skip it during upgrade. RPM sets $1 to 1 during installation and $1 to 2 during upgrade.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文