How can I set permissions for the folders (i.e. 775) while files need to be set to 664? If folders are set to 664 then users other than the rpm installer (root) will see '?' in place of files' owner/permission and I prefer not to set all files' permissions to 775 too. Structure is similar to this question!
maven-rpm-plugin set folders permission differently from files when mapping
4.7k views Asked by Kiarash Zamanifar At
2
There are 2 answers
0
On
I did it by using the <default??>
tags. Then if you needed to override a default setting, you could use the <filemode>
tag in the <mapping>
section (but the <defaultDirmode>
, <defaultUsername>
, <defaultGroupname>
are only applicable to a <mapping>
if <filemode>
, <username>
, and <groupname>
are NOT populated). Here's the plugin parameter documentation.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1.3</version>
....
<configuration>
....
<defaultDirmode>755</defaultDirmode>
<defaultFilemode>644</defaultFilemode>
<defaultGroupname>MyGroup</defaultGroupname>
<defaultUsername>MyUser</defaultUsername>
....
</configuration>
</plugin>
One solution is to map it twice excluding files in one mapping and exclude folders in the next one. Any better ideas?