Ask Your Question

Setting permissions on destination files

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

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 -0500

jeff gravatar image

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

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


Can you please tell how add shell executor stage to give file permissions for output files.

Sureshbabu gravatar imageSureshbabu ( 2018-07-26 21:25:13 -0500 )edit

Please ask a new question, @Sureshbabu - no one will see it here.

metadaddy gravatar imagemetadaddy ( 2018-07-26 21:43:38 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 1,092 times

Last updated: Jan 17 '18