The file attribute can be specified in the field of rpm.spec
, e.g.
%dir %attr(0770, userA, groupA) /etc/config/
My point is, There are many folders under /etc/config
and I want to specify their attributes the same as /etc/config
. I don’t want to specify them one by one. Is there a way to specify all the folders’ attribute under /etc/config
recursively? Just like sudo chmod -R 770 /etc/config
?
2
Answers
You can do this:
or
or
when you use the
%dir
directive, you tellrpmbuild
to package only that directory and not the contents recursively (see here). So why don’t you just use:to package
/etc/config/
and all subdirectories and files recursively with those attributes?