I have a directory /example( permission is 775) and the ownership of the folder is user1:group1. Now one of my script which executes a script as user2:group2 will write a file into /example. But I was the files written by my scripts also should have the permission of user1:group1. Can you please help me to the solution od this?

Note: I have made a secondary group of user1 is group2.

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.