Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 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@… 3 years ago.
directory permissions

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by lvr@…

directory permissions

comment:1 Changed 3 years ago by robertm

  • Status changed from new to assigned

comment:2 Changed 3 years ago by paulh

  • Status changed from assigned to infoneeded

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 3 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 3 years ago by stuartm

  • Milestone changed from unknown to 0.25
  • Status changed from infoneeded to assigned

comment:5 Changed 3 years ago by Github

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Fixes #9112.

Branch: master
Changeset: 63bd364a2324062094dcacc2fd878244a4e28e13

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.