My app creates its log file like this
FILE *ftemp = NULL;
ftemp=fopen("/var/log/x.log", "ab+");
if(ftemp)
{
fprintf(stderr, "ftemp: log created\n");
}
else
{
fprintf(stderr, "ftemp: log error:%s\n", strerror(errno));
}
The output is:
ftemp: log error:Permission denied
I will deploy it to other machines. Is there any location where my app has permissions to create its log file on any other machines?