gpt4 book ai didi

permissions - RPM 规范文件中的 %defattr 是什么意思?

转载 作者:行者123 更新时间:2023-12-03 02:08:17 27 4
gpt4 key购买 nike

创建 RPM 时,RPM 规范文件具有指令 %defattr 。我知道它定义了该 RPM 安装的文件的默认属性。如果我将 %defattr 写成如下,这意味着什么?

%defattr(-testuser, testuser)

最佳答案

您指定的模式无效。 %defattr 有四个参数

来自http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-DEFATTR-DIRECTIVE

The %defattr Directive

The %defattr directive allows setting of default attributes for files and directives. The %defattr has a similar format to the %attr directive:

  1. The default permissions, or "mode" for files.

  2. The default user id.

  3. The default group id.

  4. The default permissions, or "mode" for directories.

The %attr directive has the following format:

%defattr(file mode, user, group, dir mode)

As with %attr if a particular attribute does not need to be specified (usually because the file is installed with that attribute set properly), then that attribute may be replaced with a dash. In addition the directory mode may be ommited. %defattr tends to be used at the top of %files.

关于permissions - RPM 规范文件中的 %defattr 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6952384/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com