{"id":9507,"date":"2018-03-27T17:28:22","date_gmt":"2018-03-27T15:28:22","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=9507"},"modified":"2018-03-27T17:28:22","modified_gmt":"2018-03-27T15:28:22","slug":"linux-package-managers-permissions-user-group-ownerships-of-files-in-a-package","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2018\/03\/27\/linux-package-managers-permissions-user-group-ownerships-of-files-in-a-package\/","title":{"rendered":"Linux package managers:\u00a0permissions, user\/group ownerships of files in a package"},"content":{"rendered":"<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Dpkg\">https:\/\/en.wikipedia.org\/wiki\/Dpkg<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Dpkg#Database\">https:\/\/en.wikipedia.org\/wiki\/Dpkg#Database<\/a>:\u00a0\/var\/lib\/dpkg\/&#8230;<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Rpm_(software)\">https:\/\/en.wikipedia.org\/wiki\/Rpm_(software)<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Rpm_(software)#Local_RPM_installation_database\">https:\/\/en.wikipedia.org\/wiki\/Rpm_(software)#Local_RPM_installation_database<\/a>: \/var\/lib\/rpm\/&#8230;<\/li>\n<li><a href=\"https:\/\/unix.stackexchange.com\/questions\/634\/what-are-the-pros-cons-of-deb-vs-rpm\">https:\/\/unix.stackexchange.com\/questions\/634\/what-are-the-pros-cons-of-deb-vs-rpm<\/a><\/li>\n<\/ul>\n<p>RPM based environments support verifying and resetting permissions and user\/group ownerships of files in a package:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.cyberciti.biz\/tips\/reset-rhel-centos-fedora-package-file-permission.html\">https:\/\/www.cyberciti.biz\/tips\/reset-rhel-centos-fedora-package-file-permission.html<\/a>\u00a0&#8211;<\/li>\n<li><a href=\"https:\/\/ashok-linux-tips.blogspot.de\/2011\/12\/how-to-reset-permissions-of-installed.html\">https:\/\/ashok-linux-tips.blogspot.de\/2011\/12\/how-to-reset-permissions-of-installed.html<\/a><\/li>\n<li><a href=\"https:\/\/www.novell.com\/coolsolutions\/feature\/16238.html\">https:\/\/www.novell.com\/coolsolutions\/feature\/16238.html<\/a><\/li>\n<\/ul>\n<p>But what about Debian based ones?\u00a0On Debian there is a file for every (installed) package:<\/p>\n<ul>\n<li><code>\/var\/lib\/dpkg\/info\/<em>package<\/em>.list<\/code><\/li>\n<\/ul>\n<p>That file only includes filenames and directory names (and no details at all). Directories are not marked as directories (as opposed to files). Files within those directories do not necessarily get listed themselves.<\/p>\n<p>That file gets searched for:<\/p>\n<ul>\n<li>&#8220;<code>dpkg --search<\/code>&#8221; &#8211; which Debian package does a given file belong to?<\/li>\n<li>&#8220;<code>dpkg --listfiles<\/code>&#8221; &#8211; which files belong to a given Debian package?<\/li>\n<\/ul>\n<p>What about the Debian utility <code>cruft<\/code>:<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.debian.org\/Cruft\">https:\/\/wiki.debian.org\/Cruft<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Cruft_(software)\">https:\/\/en.wikipedia.org\/wiki\/Cruft_(software)<\/a><\/li>\n<li><a href=\"https:\/\/packages.debian.org\/stretch\/cruft\">https:\/\/packages.debian.org\/stretch\/cruft<\/a><\/li>\n<li><a href=\"https:\/\/alioth.debian.org\/projects\/cruft\/\">https:\/\/alioth.debian.org\/projects\/cruft\/<\/a><\/li>\n<\/ul>\n<p><code>cruft<\/code> cannot really be able to provide details not contained in that file.<\/p>\n<p>Other Unix-like operating systems:<\/p>\n<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Repair_permissions\">https:\/\/en.wikipedia.org\/wiki\/Repair_permissions<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/en.wikipedia.org\/wiki\/Dpkg https:\/\/en.wikipedia.org\/wiki\/Dpkg#Database:\u00a0\/var\/lib\/dpkg\/&#8230; https:\/\/en.wikipedia.org\/wiki\/Rpm_(software) https:\/\/en.wikipedia.org\/wiki\/Rpm_(software)#Local_RPM_installation_database: \/var\/lib\/rpm\/&#8230; https:\/\/unix.stackexchange.com\/questions\/634\/what-are-the-pros-cons-of-deb-vs-rpm RPM based environments support verifying and resetting permissions and user\/group ownerships of files in a package: https:\/\/www.cyberciti.biz\/tips\/reset-rhel-centos-fedora-package-file-permission.html\u00a0&#8211; https:\/\/ashok-linux-tips.blogspot.de\/2011\/12\/how-to-reset-permissions-of-installed.html https:\/\/www.novell.com\/coolsolutions\/feature\/16238.html But what about Debian based ones?\u00a0On Debian there is a file for every (installed) package: \/var\/lib\/dpkg\/info\/package.list That file only includes filenames and directory names (and no details at all). Directories [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[769,306,412],"tags":[1274],"class_list":["post-9507","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-package-management","tag-rpm"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-2tl","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=9507"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9507\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=9507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=9507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=9507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}