Alpine permission bug with lbu/apk-tools
Hi,
As discussed on the mailing list this is a bug report for the permission
in /etc.
Description :
I’m using the lastest stable 2.7.8 ALpineLinux on embeded hardware
(like
soekris).
On only use Alpine in ram and all is commited to a compact flash, like
in a normal router.
I’m a little confused to ask that but it seems i found something which
looks like a bug.
I installed the bind DNS server package, the perms are in /etc :
drwxr-x—- 2 root named 620 May 23 2014 bind
Now for a reason i need to have data sync into that dir i then change
the perms : to 775 mode , and of course lbu commit
After reboot the perms are again as installed.
I then tried to switch the
owner:group ->same
I tried to force a lbu add /etc/bind ->same problem.
I believe it can be done with every directory from a package in /etc.
Answer from Natanael :
I think its apk-tools that “fixes” the permissions on the dirs when it
install the files.
Answer from Timo :
Please file a bug. The permissions on overlay should override package
ones.
We have even code to include stuff in overlay if the only change is in
permissions. This probably is regression caused by the code “merging”
the directory permissions from different packages.
Regards
(from redmine: issue id 2966, created on 2014-05-24, closed on 2015-12-09)
- Relations:
- relates #9364
- Changesets:
- Revision 09e48d8f by Timo Teräs on 2014-10-07T13:11:29Z:
db: rework directory permission handling
Apk used to reset directory permissions always, but this is undesirable
if user has modified the permissions - especially during tmpfs boot.
Though, it is desirable to update the permissions when packaging has
changed permissions, or a new package is installed and the merged
permission mask / owner changes.
Thus the new code updates the permissions only if:
1) We are booting and directory is not in apkovl
2) The directory is modified by a package install/remove/upgrade
3) The filesystem directory permission matched database
Additionally "apk fix --directory-permissions" can be used to reset
all directory permissions to the database defaults.
Fixes #2966