premission

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

premission

#1 Post by George »

Hello,

It would be nice to know if I can get dicomImage -> writeBMP(), that has a better writing permission mask because I am getting an issue
in which I do not write with a good permission that I can read the file afterwards without sudo permission, tell me how to address this issue.

Best Regards
George

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: premission

#2 Post by Marco Eichelberg »

This is not something that can be solved in DCMTK. The writeBMP() method simply uses fopen() to create a file. Such a file always has the owner corresponding to the process creating the file, and access rights 0666 (read-write permission for owner, group and others) as modified by the process umask, see umask(2). If you cannot read the file afterwards, then you are running the process calling writeBMP() from a different user ID. Adjust group (effective gid) and umask to fix this.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest