title: Cannot create POSIX named semaphores due to a permissions error (EACCES)
body: <p>This is a tough one.</p>
  
  <p>Cannot create a POSIX named semaphore (<code>sem_open</code>) no matter the name on a system where there are no semaphores (thus no chance of name overlapping). This is a non-privileged user able to create a shared memory using shmget.</p>
  
  <p><strong>Platform</strong>: Solaris 10</p>
  
  <p><strong>Hardware</strong>: Intel Xeon E5000 series CPU</p>
  
  <p>Does not happen on other Solaris 10 platforms running AMD CPUs with non-privileged users. Does not happen on Linux machines. No apparent differences between these machines, other than the fact that this machine is very likely virtualized.</p>
  
  <p>Code:</p>
  
  <pre><code>    const char* name = "/permission_test_semaphore";
  
      sem_t* sem = sem_open(name, O_CREAT | O_EXCL, 0644, 0);
      if (SEM_FAILED == sem)
      {
              printf("Could not create test semaphore %s, errno = %d\n", name, errno);
      }
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>Could not create test semaphore /permission_test_semaphore, errno = 13
  </code></pre>
  
  <p>Any ideas are welcome -- my hopes are not up.</p>