[
http://jira.codehaus.org/browse/MRPM-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231626#action_231626
]
Brett Okken commented on MRPM-89:
---------------------------------
Are "cache" and "plugins" directories or files? If so, and the problem is that
the files in the directories are not explicitly listed and thus inheriting the
directory permissions, try setting directoryIncluded[1] to false in your
mapping.
[1] -
http://mojo.codehaus.org/rpm-maven-plugin/map-params.html#directoryIncluded
> Use default file/directory permissions if a mapping only specifies username
> and/or group
> ----------------------------------------------------------------------------------------
>
> Key: MRPM-89
> URL: http://jira.codehaus.org/browse/MRPM-89
> Project: Mojo RPM Plugin
> Issue Type: Improvement
> Affects Versions: 2.1-alpha-1
> Reporter: Colin Kinder
> Assignee: Brett Okken
>
> My rpm generation is working great with the exception of this one issue. If,
> in a mapping section, I specify a subset of the 3 permission options
> (username/groupname/filemode) the other defaults don't seem to be picked up.
> In the situation I've described below I'm trying to specify a different
> username from the defaults but I want to retain the defaultDirmode,
> defaultFilemode, and defaultGroupname under the directory specified. The
> configuration below results in all files/directories with 644 permissions.
> I've set these as my defaults:
> ...
> <defaultDirmode>755</defaultDirmode>
> <defaultFilemode>644</defaultFilemode>
> <defaultUsername>appread</defaultUsername>
> <defaultGroupname>appread</defaultGroupname>
> ...
> <mapping>
> <username>apache</username>
> <recurseDirectories>true</recurseDirectories>
>
> <directory>/var/www/domains/${project.artifactId}/var/</directory>
> <sources>
> <source>
> <location>var</location>
> </source>
> </sources>
> </mapping>
> ...
> My goal is for the apache user to own everything under
> /var/www/domains/projectxyz/var/, which works. The problem is that
> everything under /var/www/domains/projectxyz/var/ is getting 644 permissions,
> including directories. Here is what's produced in the spec file that's
> causing the problem:
> %attr(644,apache,appread) /var/www/domains/projectxyz/var//
> %attr(644,apache,appread) /var/www/domains/projectxyz/var//cache
> %attr(644,apache,appread) /var/www/domains/projectxyz/var//plugins
> I think it makes sense to use defaults for file/directory permissions where
> none are specified in mapping elements but this doesn't seem to be happening.
> Let me know if you need more information.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email