I belong to multiple groups (AAA, BBB, CCC, and etc.) on a Linux server. And I wrote a python code that generates a file on the server. When generated, this file belongs to group AAA, by default. But I hope the file belong to group BBB. Do I have to manually use the "chgrp" command on this file to change its group, after I run the codes? Is there a way to automatically do it so whenever I run this code, the generated file always belong to group BBB?
I've tried to "run the python codes as a member of group BBB", by switching my current group to BBB - by doing newgrp BBB
and then run the codes. But it didn't work and the generated file still belong to group AAA.
Please kindly help. Thanks!
rws
permissions rather than the usual rwx)ls -ld
on the directory.ls -ld
and saw the usualrwx
, notrws
. What does this imply? Thanks again and sorry for the late reponse.