You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Tony Kurc (JIRA)" <ji...@apache.org> on 2015/10/17 15:49:05 UTC

[jira] [Commented] (NIFI-995) TestGetFile fails in case of NTFS mount in Linux

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

Tony Kurc commented on NIFI-995:
--------------------------------

reviewing pull request

> TestGetFile fails in case of NTFS mount in Linux
> ------------------------------------------------
>
>                 Key: NIFI-995
>                 URL: https://issues.apache.org/jira/browse/NIFI-995
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Joe Mészáros
>            Assignee: Tony Kurc
>              Labels: NTFS, test
>
> I cloned the NiFi source code to local directory on a NTFS partition in Linux, and was surprised, when one of the standard test case failed on my box. The problem was with the last step of TestGetFile#testAttributes(), which checks, whether the file permission modification is working.
> The original implementation used Files.setPosixFilePermissions() method to set the file permission, and if no exception was raised (verifyPermissions), it made this file permission check.
> If you have a NTFS partition mounted in Linux, you are unable to change the permissions of your files, which is controlled globally with the 'fmask' and 'dmask' mount options. It means, that you are able to run chmod commands without any error, but it does not have any effect. 
> From Java perspective, the Files.setPosixFilePermissions() was successful (no exception), but the file's permissions were not changed, and the last check failed.
> An extra check is needed and set verifyPermissions to true, only if the Files.setPosixFilePermissions() changed the permissions of targetPath.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)