Opened 12 years ago

Closed 12 years ago

#4250 closed Bugs (fixed)

Interprocess tmp folder permission denied problem

Reported by: josephsieh@… Owned by: Ion Gaztañaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

shmData = new shared_memory_object (

create_only, shmDataName, read_write

);

When shared_memory_object is created, IPC will create a tmp folder "boost_interprocess" in "C:\ProgramData" folder under Windows VISTA+, and in "/tmp" under Mac. Then start to create a file under "boost_interprocess" directory.

The issue happens when user A call the IPC (C:\ProgramData\boost_interprocess" will be created), then switch to another user B account, try to call the IPC again, then IPC will fail, due to "boost_interprocess" is already created by user A, therefore, user B has no permission to write anything into created "boost_interprocess" folder.

A quick fix of this problem might be modification of "inline void get_tmp_base_dir(std::string &tmp_name)" function in "boost/interprocess/detail/tmp_dir_helpers.hpp".

In line 103, instead of using the same "/boost_interprocess", maybe "boost_interprocess_$username" will be a solution for multiple users problem.

This issue exists at least from 1.40.0 to 1.43.0.

Change History (1)

comment:1 by Ion Gaztañaga, 12 years ago

Milestone: Boost 1.43.0Boost-1.45.0
Resolution: fixed
Status: newclosed

Fixed for Boost 1.45 in release branch (folder is created without all access).

Note: See TracTickets for help on using tickets.