I have problem with open already exist semaphor created other user in one group. sem_open(3) failed with 'Permission denied' error.
Metaphor created with all permission.
test.c
Expl output:
@aircrazy and @anotheruser in one group. FreeBSD 9.1 under jails.
Please, explain why I have this error?
Metaphor created with all permission.
test.c
Code:
sem_t * s = sem_open("/testsem5", O_CREAT, S_IRWXG | S_IRWXO |S_IRWXU);
if(s == SEM_FAILED){
int err = errno;
printf("%s(%i)\n", strerror(err), err);
}else{
printf("ok\n");
}
Expl output:
Code:
[anotheruser@server]./test.out
ok
[aircrazy@server]./test.out
Permission denied(13)
Please, explain why I have this error?
Last edited by a moderator: