Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Locking a file while writing on it to prevent any other users from viewing content

  1. #1
    Join Date
    Mar 2016
    Posts
    2

    Default Locking a file while writing on it to prevent any other users from viewing content

    Hi,

    I need a guide on how to put a lock on a file such that no other process, users can view, modify or generally make changes to it while my process is working on it, until I release the lock on it.

    thanks.

  2. #2
    Join Date
    Aug 2011
    Posts
    360

    Default

    Maybe the simplest way is to move/write the file in a private directory, then move it to the inital dir

  3. #3
    Join Date
    Mar 2016
    Posts
    2

    Default

    Quote Originally Posted by Mathias.CH View Post
    Maybe the simplest way is to move/write the file in a private directory, then move it to the inital dir
    Same thing, How do I block access to the directory by any other user?
    Locking the file seems the easier option, just haven't seen how to do this.
    I want to believe there is a way to do this.
    thanks.

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by CharlesAko View Post
    Same thing, How do I block access to the directory by any other user?
    OS Directory Permissions?

    /path/to/destination : Read / Write as appropriate
    /path/to/destination/wip : Read/Write assigned to PDI user only. No other Read access.

    After you've finished writing all the data to /path/to/destination/wip/final.file , you use a move/rename step in a job to move the file to /path/to/destination/final.file

    I'm assuming that you're trying to allow multiple different users to run the ETL rather than a service account, and that's why you're telling us that it's not possible. Question back would be, why *AREN'T* you using a service account?
    Last edited by gutlez; 03-10-2016 at 03:16 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.