Bug 922557

Summary: permissions on files created by librepo
Product: [Fedora] Fedora Reporter: Ales Kozumplik <akozumpl>
Component: librepoAssignee: Tomas Mlcoch <tmlcoch>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jzeleny, tmlcoch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-18 09:27:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910088    

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)