Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434894 - app-admin/webapp-config: Bad permissions for server-owned dirs (umask 022)
Summary: app-admin/webapp-config: Bad permissions for server-owned dirs (umask 022)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-09-13 12:34 UTC by Vincent Brillault
Modified: 2013-03-14 02:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Set umask to 0 before installing an app (webapp-config-1.20.19-remove-umask.patch,251 bytes, patch)
2012-09-13 12:34 UTC, Vincent Brillault
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Brillault 2012-09-13 12:34:51 UTC
Created attachment 323654 [details, diff]
Set umask to 0 before installing an app

app-admin/webapp-config uses 'os.makedirs(dst_dir, perm(0o755))' to create new directories without any 'os.chown' after. If the configuration contains 'vhost_perms_serverowned_dir="0775"' or vhost_perms_serverowned_dir="g+w" those permissions will be filtered with the default python umask which is '022', resulting in a '0755' permission instead of a '0775' one.

To reproduce:
- set 'vhost_perms_serverowned_dir="0775"'
- Install any webapp that have server-owned dirs (e.g. owncloud)
- Verify the permission

An easy way to fix that is to call 'os.umask(0)' before creating dirs, as proposed in the provided patch
Comment 1 Devan Franchini (RETIRED) gentoo-dev 2013-03-14 01:35:20 UTC
Patch confirmed, sane patch :)

blueness, commit whenever you want. It works.