开发者

Keep RPM from changing directory permissions

开发者 https://www.devze.com 2023-04-09 11:43 出处:网络
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 mi

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号