Ask Your Question

Setting permissions on destination files

asked 2018-01-16 18:50:45 -0600

lampshadesdrifter gravatar image

Is there a way to set the permissions of files that land in a destination pipeline stage? Currently have a simple pipeline that moves data from an local FS origin (as csv) and places it in another local FS location (as json). I find that when the the json files are written, they have the permissions "-rwxr-xr-x". I would rather they have permissions "-rw-rw-r--", which seems a bit safer to me. Is there any way to do this? Could someone explain how this is happening internally in the first place? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-17 10:33:52 -0600

jeff gravatar image

updated 2018-01-17 10:34:01 -0600

In a Unix-type system, the resulting permissions are typically controlled by umask. If you have appropriate access on the machine, you can try changing the umask for the directory into which you are writing files to be what you want. Another option is to add a Shell Executor stage that will execute the appropriate chmod command at the appropriate time (for instance, when the local FS destination closes a file; see event generation here).

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-16 18:50:45 -0600

Seen: 21 times

Last updated: Jan 17