Bug 922557 - permissions on files created by librepo
Summary: permissions on files created by librepo
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: librepo
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mlcoch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 910088
TreeView+ depends on / blocked
 
Reported: 2013-03-17 20:57 UTC by Ales Kozumplik
Modified: 2014-09-30 23:41 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-18 09:27:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ales Kozumplik 2013-03-17 20:57:02 UTC
when librepo downloads a file, it uses 0660 permissions for it. This is the default that can not be changed AFAIK, the 0660 pre-umasked permission bits are hardcoded, e.g. yum.c:218:

fd = open(path, O_CREAT|O_TRUNC|O_RDWR, 0660);)

This is generally not what the calling code would expect: the API either has to have a configuration option for the default permissions mode, or, even simpler, just use 0666 that gets anded to the process's umask.

Comment 1 Tomas Mlcoch 2013-03-18 09:27:15 UTC
commit 9b69b7df33cf778550de82c2a560989bae213659
(https://github.com/Tojaj/librepo/commit/9b69b7df33cf778550de82c2a560989bae213659)


Note You need to log in before you can comment on or make changes to this bug.