Opened 13 years ago

Closed 13 years ago

#9112 closed patch (fixed)

[PATCH] mythmusic directory permissions

Reported by: lvr@… Owned by: paulh
Priority: minor Milestone: 0.25
Component: Plugin - MythMusic Version: Master Head
Severity: low Keywords: directory permissions
Cc: Ticket locked: no

Description

When mythmusic creates the sub-directories of the path for a new music file then umask is set to 022 - clearing the 'group write' and 'other write' bits. This can create problems when the base directory is on a mounted share and the creator is not the owner of the share but has write permission by means of group membership; for instance when the directory is shared over NFS or Samba and the permissions are drwsrwsr-t, i.e. a 'drop box'. In this case when the file is created the missing group write permission on the containing directory causes the open to fail.

The attached patch changes umask to 002, permitting 'group write' in the created directories.

Attachments (1)

mythplugins.diff (528 bytes) - added by lvr@… 13 years ago.
directory permissions

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by lvr@…

Attachment: mythplugins.diff added

directory permissions

comment:1 Changed 13 years ago by robertm

Status: newassigned

comment:2 Changed 13 years ago by paulh

Status: assignedinfoneeded

If you remove the call to umask() does it then do the right thing for you? I believe Qt will try to create the directory with the same permissions as the parent which is what we want in most cases.

comment:3 Changed 13 years ago by Lawrence Rust <lvr@…>

Apologies for the delay in replying - been away over the holidays and now catching up with the backlog. Happy New Year.

If the call to umask() is removed then the directory is created OK, given that the parent process' umask is set correctly. At least in this case the user is back in control and can set umask from the command line or a script.

comment:4 Changed 13 years ago by stuartm

Milestone: unknown0.25
Status: infoneededassigned

comment:5 Changed 13 years ago by Github

Resolution: fixed
Status: assignedclosed

MythMusic: relax the write permissions on directories created by the ripper.

Fixes #9112.

Branch: master Changeset: 63bd364a2324062094dcacc2fd878244a4e28e13

Note: See TracTickets for help on using tickets.