We're receiving the below files from upstream which is a mainframe system.

-rw-rw---- 1 s36748 xyz      293 Jun  6 19:20 CSJ_H_20190606.csv
-rw-rw---- 1 s36748 xyz     3284 Jun  6 19:20 A_20190606.csv

Here, 'xyz' is my groupid.

The files which are landing in our server(downstream) have the owner as that of the mainframe system. But we need the 'read-write' permissions for 'others' as well, because these files would be further used for processing.

I'm not able to modify the perrmissions of the file as my userid is different. I've tried 'umask' setting as well, but i believe that only works for the files/directories created by my userid only.

Can the umask setting be modified the root user, so that the modified settings could be reflected for all the files irrespective of owner?

  • 2
    How are you receiving the files? Since your user can read the files, you could make a copy of them—which you are then the owner of—and make them world readable – Torin Jun 14 at 11:50
  • @Torin : We are receiving the files through ftps protocol. As suggested by you, yes that could be a workaround. Thanks! – User123 Jun 14 at 11:57
  • Is there a requirement for the files to have your GID? How is this achieved? Maybe you should use a different GID which can be assigned as a secondary group to all users who need to access the files. You could change the GID of the directory to this group and set the setgid bit. – Bodo Jun 14 at 12:44
  • As I read your question. Couldn't the (receiving) directory be chowned in such a way that they (the files) aquire the correct user/group by adding the so-called "sticky" bit to the directory as well? That's how I've always handled this situation. – somebody Jun 15 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.