New files created by my application not inheriting parent group name

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












In my linux machine, I have set group permission of parent folder Node1 using chmod g+s,



drwxrwsr-x 2 root fsync 4096 Jun 27 17:40 Node1


But some of the new files (not all) created by my application inside, folder-Node1 are getting group name root. (My application is written in C and runs as root. It uses fopen,fwrite to write to file). Why is it not inheriting parent group-fsync ?



ls -l Node1 gives below result



-rw-rw-r-- 1 root root 6.9K Jun 27 15:28 180906,163151896,IST,P047,Node1,Kalkitech.CFG
-rw-rw-r-- 1 root root 107.5K Jun 27 15:31 180906,163151896,IST,P047,Node1,Kalkitech.DAT






share|improve this question

















  • 1




    it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
    – A.B
    Jun 29 at 20:27















up vote
0
down vote

favorite












In my linux machine, I have set group permission of parent folder Node1 using chmod g+s,



drwxrwsr-x 2 root fsync 4096 Jun 27 17:40 Node1


But some of the new files (not all) created by my application inside, folder-Node1 are getting group name root. (My application is written in C and runs as root. It uses fopen,fwrite to write to file). Why is it not inheriting parent group-fsync ?



ls -l Node1 gives below result



-rw-rw-r-- 1 root root 6.9K Jun 27 15:28 180906,163151896,IST,P047,Node1,Kalkitech.CFG
-rw-rw-r-- 1 root root 107.5K Jun 27 15:31 180906,163151896,IST,P047,Node1,Kalkitech.DAT






share|improve this question

















  • 1




    it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
    – A.B
    Jun 29 at 20:27













up vote
0
down vote

favorite









up vote
0
down vote

favorite











In my linux machine, I have set group permission of parent folder Node1 using chmod g+s,



drwxrwsr-x 2 root fsync 4096 Jun 27 17:40 Node1


But some of the new files (not all) created by my application inside, folder-Node1 are getting group name root. (My application is written in C and runs as root. It uses fopen,fwrite to write to file). Why is it not inheriting parent group-fsync ?



ls -l Node1 gives below result



-rw-rw-r-- 1 root root 6.9K Jun 27 15:28 180906,163151896,IST,P047,Node1,Kalkitech.CFG
-rw-rw-r-- 1 root root 107.5K Jun 27 15:31 180906,163151896,IST,P047,Node1,Kalkitech.DAT






share|improve this question













In my linux machine, I have set group permission of parent folder Node1 using chmod g+s,



drwxrwsr-x 2 root fsync 4096 Jun 27 17:40 Node1


But some of the new files (not all) created by my application inside, folder-Node1 are getting group name root. (My application is written in C and runs as root. It uses fopen,fwrite to write to file). Why is it not inheriting parent group-fsync ?



ls -l Node1 gives below result



-rw-rw-r-- 1 root root 6.9K Jun 27 15:28 180906,163151896,IST,P047,Node1,Kalkitech.CFG
-rw-rw-r-- 1 root root 107.5K Jun 27 15:31 180906,163151896,IST,P047,Node1,Kalkitech.DAT








share|improve this question












share|improve this question




share|improve this question








edited Jun 27 at 14:40









Arushix

9968




9968









asked Jun 27 at 12:43









Sreesyam K

1




1







  • 1




    it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
    – A.B
    Jun 29 at 20:27













  • 1




    it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
    – A.B
    Jun 29 at 20:27








1




1




it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
– A.B
Jun 29 at 20:27





it's possible the file is initially created with the fsync group and then your application changes the group. Or the file is created outside of Node1 then moved there (thus not created if on the same filesystem, the group won't change). Could be debugged with strace on the application or perhaps with inotifywait on the directory.
– A.B
Jun 29 at 20:27
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452209%2fnew-files-created-by-my-application-not-inheriting-parent-group-name%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452209%2fnew-files-created-by-my-application-not-inheriting-parent-group-name%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?