Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 654138

Summary: sys-apps/portage: add FEATURES=overwrite-dir-perms option to make fperms calls overwrite existing directory permissions for purposes of automation
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: wizardedit
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=141619
https://bugs.gentoo.org/show_bug.cgi?id=396153
https://bugs.gentoo.org/show_bug.cgi?id=607430
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 193766, 761954    

Description Zac Medico gentoo-dev 2018-04-26 16:51:55 UTC
In order to respect the wishes of system administrators, fperms calls do not overwrite permissions of existing directories on the system. For purposes of automation in some environments, it may be desirable to trust all fperms calls implicitly, and make them overwrite permissions of existing directories on the system. This behavior could be implemented with an optional FEATURES="overwrite-dir-perms" setting.

Note that bug 396153 proposes a PMS extension that would introduce a database of administrative permission overrrides, meanwhile a FEATURES="overwrite-dir-perms" option is simpler to implement and would be an appropriate solution for many environments.
Comment 1 Zac Medico gentoo-dev 2018-05-02 22:53:14 UTC
My current plan:

* Directories having permissions that differ from defaults (755 root:root) will automatically overwrite permissions of existing directories.

* In cases where a package installs a directory with default permissions and the existing directory has non-default permissions, the existing directory's permissions will be reverted to default permissions only if the directory belongs solely to the current package.