You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by joemeszaros <gi...@git.apache.org> on 2015/09/24 13:06:27 UTC

[GitHub] nifi pull request: NIFI-995: TestGetFile failed in case of NTFS pa...

GitHub user joemeszaros opened a pull request:

    https://github.com/apache/nifi/pull/95

    NIFI-995: TestGetFile failed in case of NTFS partition in Linux

    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`.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ImpressTV/nifi NIFI-995

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/95.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #95
    
----
commit 46edb8ce4c6c6f837bb6e7b279d8642f96bbba47
Author: Joe <jo...@impresstv.com>
Date:   2015-09-24T11:02:11Z

    NIFI-995: Fix for TestGetFile tests (only for NTFS)
    
    TestGetFile.testAttributes() failed in case of a NTFS partition in Linux, because Files.setPosixFilePermissions() did not have any effect on the files.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-995: TestGetFile failed in case of NTFS pa...

Posted by trkurc <gi...@git.apache.org>.
Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/95#issuecomment-148921603
  
    Nice catch and cool patch! 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-995: TestGetFile failed in case of NTFS pa...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/95


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---