Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
apk-tools
apk-tools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 60
    • Issues 60
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 13
    • Merge Requests 13
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • apk-toolsapk-tools
  • Issues
  • #2966

Closed
Open
Opened May 24, 2014 by Nicolas Schmerber@nschmerber
  • Report abuse
  • New issue
Report abuse New issue

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
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
3
Labels
Bug Closed Normal
Assign labels
  • View project labels
Reference: alpine/apk-tools#2966