Opened 11 years ago
Closed 11 years ago
#5548 closed Bugs (worksforme)
Boost interprocess shared memory mutex requires root permissions on Linux
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Programs that uses shared memory, especially shared memory mutex on Linux are working only when super-user permissions are granted. POSIX does not require that, so that is a bug in BOOST IPC implementation to require SU permissions.
Workaround is to create a group that will have a high access rights to /dev/shm and then add all users that may use application to that group, but that is not solving all problems.
Attachments (2)
Change History (6)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Interprocess uses POSIX calls (shm_open)to implement shared memory. Please review if those calls require SU permissions in your machine. If Interprocess correctly calls POSIX functions, then there is no bug in Interprocess.
by , 11 years ago
by , 11 years ago
comment:3 by , 11 years ago
In the attachments there is an example that is working when the user has admin rights, but when the user has no admin rights (normal OS user) boost part is failing and POSIX is working. OS specification: Ubuntu 10.04 LTS.
comment:4 by , 11 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
As said this is outside interprocess, I think it's a bug in your OS init scripts, as POSIX requires shared memory to be usable from non-root users.
On Windows it works as expected.