You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/07/14 16:10:00 UTC

[jira] [Commented] (NIFI-6128) UnpackContent has no awareness of file permissions

    [ https://issues.apache.org/jira/browse/NIFI-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157481#comment-17157481 ] 

ASF subversion and git services commented on NIFI-6128:
-------------------------------------------------------

Commit b1e77019accec8cb32c41d34838f2225299f72b4 in nifi's branch refs/heads/main from Tamás Bunth
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b1e7701 ]

NIFI-6128 UnpackContent: Store unpacked file data

Tar format allows us to archive files with their original permission,
owner, group name and last modification time.

When unpacking with Tar unpacker, these information are stored in new
attributes with names: "file.inner.*". This way, it preserves backward
compatibility when using parallel with GetFile processor (which stores
information in "file.*").

NIFI-6128 Tar unpackContent: assert date of last modification of content is a valid date format.

NIFI-6128 UnpackContent: use original attributes

In case of tar format:
- Use "file.*" attributes instead of "file.inner.*" (which eventually
  lead to overwrite if tar had been fetched with GetFile)
- Store file permission in "rwx" format, instead of integer
  representation.
- Also replace SimpleDateFormat with DateTimeFormatter.

Replace generic error with IllegalArgumentException
Also refactor: move permission string to top of file as static constant.

Update test

Remove 'file systems' text

Unpackcontent: Fill file.creationTime attribute
which always holds the very same value as file.lastModifiedTime.

This closes #4370.

Signed-off-by: Peter Turcsanyi <tu...@apache.org>


> UnpackContent has no awareness of file permissions
> --------------------------------------------------
>
>                 Key: NIFI-6128
>                 URL: https://issues.apache.org/jira/browse/NIFI-6128
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.9.0
>            Reporter: Justin Rittenhouse
>            Assignee: Tamás Bunth
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> MergeContent using TAR for packing allows for storing permissions in the newly created tarball via the tar.permissions attribute on incoming files.  UnpackContent discards all permissions information on extraction.  This makes it impossible to restore a file from a tarball with previously recorded permissions via NiFi.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)