What user does apt-get install software under?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I just installed some software using apt-get, and its owner and group is "logger". Since I installed the software using sudo, why isn't the owner and group "root"? I am pretty sure about a year ago, I renamed user pi with the new name logger. Could this have caused it, and if so, why?



michael@rp3:~ $ ls -l /usr | grep local
drwxrwsr-x 12 root staff 4096 Dec 23 16:49 local
michael@rp3:~ $ ls -l /usr/local
total 32
drwxrwsr-x 2 root staff 4096 Dec 23 16:47 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src
michael@rp3:~ $ sudo apt-get install test-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
test-utils
The following NEW packages will be installed:
test-client test-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,575 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
test-utils test-client
Install these packages without verification? [y/N] y
Selecting previously unselected package test-utils.
(Reading database ... 41030 files and directories currently installed.)
Preparing to unpack .../test-utils_0.1.1-jessie_armhf.deb ...
Unpacking test-utils (0.1.1-jessie) ...
Selecting previously unselected package test-client.
Preparing to unpack .../test-client_0.1.2-jessie_armhf.deb ...
Unpacking test-client (0.1.2-jessie) ...
Setting up test-utils (0.1.1-jessie) ...
Setting up test-client (0.1.2-jessie) ...
michael@rp3:~ $ ls -l /usr/local
total 40
drwxrwxr-x 6 logger logger 4096 Dec 23 16:49 test-client
drwxrwxr-x 3 logger logger 4096 Dec 23 16:49 test-utils
drwxrwsr-x 2 root staff 4096 Dec 23 16:49 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src

michael@rp3:~ $ cat /etc/passwd | grep 'apt|logger|root|michael'
root:x:0:0:root:/root:/bin/bash
michael:x:1001:1001:,,,:/home/michael:/bin/bash
_apt:x:109:65534::/nonexistent:/bin/false
logger:x:1000:1000:,,,:/home/logger:/bin/bash
michael@rp3:~ $ cat /etc/group | grep 'apt|logger|root|michael'
root:x:0:
michael:x:1001:
wireshark:x:114:michael
logger:x:1000:
michael@rp3:~ $ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL
michael ALL=(ALL:ALL) ALL
anton ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
michael@rp3:~ $ ls -l /etc/sudoers.d
total 8
-r--r----- 1 root root 27 Oct 18 2016 010_pi-nopasswd
-r--r----- 1 root root 958 Jan 11 2016 README
michael@rp3:~ $ sudo cat /etc/sudoers.d/*
pi ALL=(ALL) NOPASSWD: ALL
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
# #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because sudoers contents can vary widely, no attempt is
# made to add this directive to existing sudoers files on upgrade. Feel free
# to add the above directive to the end of your /etc/sudoers file to enable
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
michael@rp3:~ $






share|improve this question






















  • what groupid has logger on your system? maybe your group ids got mixed up
    – arved
    Dec 23 '17 at 19:46














up vote
0
down vote

favorite
1












I just installed some software using apt-get, and its owner and group is "logger". Since I installed the software using sudo, why isn't the owner and group "root"? I am pretty sure about a year ago, I renamed user pi with the new name logger. Could this have caused it, and if so, why?



michael@rp3:~ $ ls -l /usr | grep local
drwxrwsr-x 12 root staff 4096 Dec 23 16:49 local
michael@rp3:~ $ ls -l /usr/local
total 32
drwxrwsr-x 2 root staff 4096 Dec 23 16:47 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src
michael@rp3:~ $ sudo apt-get install test-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
test-utils
The following NEW packages will be installed:
test-client test-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,575 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
test-utils test-client
Install these packages without verification? [y/N] y
Selecting previously unselected package test-utils.
(Reading database ... 41030 files and directories currently installed.)
Preparing to unpack .../test-utils_0.1.1-jessie_armhf.deb ...
Unpacking test-utils (0.1.1-jessie) ...
Selecting previously unselected package test-client.
Preparing to unpack .../test-client_0.1.2-jessie_armhf.deb ...
Unpacking test-client (0.1.2-jessie) ...
Setting up test-utils (0.1.1-jessie) ...
Setting up test-client (0.1.2-jessie) ...
michael@rp3:~ $ ls -l /usr/local
total 40
drwxrwxr-x 6 logger logger 4096 Dec 23 16:49 test-client
drwxrwxr-x 3 logger logger 4096 Dec 23 16:49 test-utils
drwxrwsr-x 2 root staff 4096 Dec 23 16:49 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src

michael@rp3:~ $ cat /etc/passwd | grep 'apt|logger|root|michael'
root:x:0:0:root:/root:/bin/bash
michael:x:1001:1001:,,,:/home/michael:/bin/bash
_apt:x:109:65534::/nonexistent:/bin/false
logger:x:1000:1000:,,,:/home/logger:/bin/bash
michael@rp3:~ $ cat /etc/group | grep 'apt|logger|root|michael'
root:x:0:
michael:x:1001:
wireshark:x:114:michael
logger:x:1000:
michael@rp3:~ $ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL
michael ALL=(ALL:ALL) ALL
anton ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
michael@rp3:~ $ ls -l /etc/sudoers.d
total 8
-r--r----- 1 root root 27 Oct 18 2016 010_pi-nopasswd
-r--r----- 1 root root 958 Jan 11 2016 README
michael@rp3:~ $ sudo cat /etc/sudoers.d/*
pi ALL=(ALL) NOPASSWD: ALL
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
# #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because sudoers contents can vary widely, no attempt is
# made to add this directive to existing sudoers files on upgrade. Feel free
# to add the above directive to the end of your /etc/sudoers file to enable
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
michael@rp3:~ $






share|improve this question






















  • what groupid has logger on your system? maybe your group ids got mixed up
    – arved
    Dec 23 '17 at 19:46












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I just installed some software using apt-get, and its owner and group is "logger". Since I installed the software using sudo, why isn't the owner and group "root"? I am pretty sure about a year ago, I renamed user pi with the new name logger. Could this have caused it, and if so, why?



michael@rp3:~ $ ls -l /usr | grep local
drwxrwsr-x 12 root staff 4096 Dec 23 16:49 local
michael@rp3:~ $ ls -l /usr/local
total 32
drwxrwsr-x 2 root staff 4096 Dec 23 16:47 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src
michael@rp3:~ $ sudo apt-get install test-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
test-utils
The following NEW packages will be installed:
test-client test-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,575 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
test-utils test-client
Install these packages without verification? [y/N] y
Selecting previously unselected package test-utils.
(Reading database ... 41030 files and directories currently installed.)
Preparing to unpack .../test-utils_0.1.1-jessie_armhf.deb ...
Unpacking test-utils (0.1.1-jessie) ...
Selecting previously unselected package test-client.
Preparing to unpack .../test-client_0.1.2-jessie_armhf.deb ...
Unpacking test-client (0.1.2-jessie) ...
Setting up test-utils (0.1.1-jessie) ...
Setting up test-client (0.1.2-jessie) ...
michael@rp3:~ $ ls -l /usr/local
total 40
drwxrwxr-x 6 logger logger 4096 Dec 23 16:49 test-client
drwxrwxr-x 3 logger logger 4096 Dec 23 16:49 test-utils
drwxrwsr-x 2 root staff 4096 Dec 23 16:49 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src

michael@rp3:~ $ cat /etc/passwd | grep 'apt|logger|root|michael'
root:x:0:0:root:/root:/bin/bash
michael:x:1001:1001:,,,:/home/michael:/bin/bash
_apt:x:109:65534::/nonexistent:/bin/false
logger:x:1000:1000:,,,:/home/logger:/bin/bash
michael@rp3:~ $ cat /etc/group | grep 'apt|logger|root|michael'
root:x:0:
michael:x:1001:
wireshark:x:114:michael
logger:x:1000:
michael@rp3:~ $ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL
michael ALL=(ALL:ALL) ALL
anton ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
michael@rp3:~ $ ls -l /etc/sudoers.d
total 8
-r--r----- 1 root root 27 Oct 18 2016 010_pi-nopasswd
-r--r----- 1 root root 958 Jan 11 2016 README
michael@rp3:~ $ sudo cat /etc/sudoers.d/*
pi ALL=(ALL) NOPASSWD: ALL
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
# #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because sudoers contents can vary widely, no attempt is
# made to add this directive to existing sudoers files on upgrade. Feel free
# to add the above directive to the end of your /etc/sudoers file to enable
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
michael@rp3:~ $






share|improve this question














I just installed some software using apt-get, and its owner and group is "logger". Since I installed the software using sudo, why isn't the owner and group "root"? I am pretty sure about a year ago, I renamed user pi with the new name logger. Could this have caused it, and if so, why?



michael@rp3:~ $ ls -l /usr | grep local
drwxrwsr-x 12 root staff 4096 Dec 23 16:49 local
michael@rp3:~ $ ls -l /usr/local
total 32
drwxrwsr-x 2 root staff 4096 Dec 23 16:47 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src
michael@rp3:~ $ sudo apt-get install test-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
test-utils
The following NEW packages will be installed:
test-client test-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,575 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
test-utils test-client
Install these packages without verification? [y/N] y
Selecting previously unselected package test-utils.
(Reading database ... 41030 files and directories currently installed.)
Preparing to unpack .../test-utils_0.1.1-jessie_armhf.deb ...
Unpacking test-utils (0.1.1-jessie) ...
Selecting previously unselected package test-client.
Preparing to unpack .../test-client_0.1.2-jessie_armhf.deb ...
Unpacking test-client (0.1.2-jessie) ...
Setting up test-utils (0.1.1-jessie) ...
Setting up test-client (0.1.2-jessie) ...
michael@rp3:~ $ ls -l /usr/local
total 40
drwxrwxr-x 6 logger logger 4096 Dec 23 16:49 test-client
drwxrwxr-x 3 logger logger 4096 Dec 23 16:49 test-utils
drwxrwsr-x 2 root staff 4096 Dec 23 16:49 bin
drwxrwsr-x 2 root staff 4096 Apr 10 2017 etc
drwxrwsr-x 2 root staff 4096 Apr 10 2017 games
drwxrwsr-x 2 root staff 4096 Apr 10 2017 include
drwxrwsr-x 4 root staff 4096 Jun 4 2017 lib
lrwxrwxrwx 1 root staff 9 Apr 10 2017 man -> share/man
drwxrwsr-x 2 root staff 4096 Apr 10 2017 sbin
drwxrwsr-x 7 root staff 4096 Dec 23 15:20 share
drwxrwsr-x 2 root staff 4096 Apr 10 2017 src

michael@rp3:~ $ cat /etc/passwd | grep 'apt|logger|root|michael'
root:x:0:0:root:/root:/bin/bash
michael:x:1001:1001:,,,:/home/michael:/bin/bash
_apt:x:109:65534::/nonexistent:/bin/false
logger:x:1000:1000:,,,:/home/logger:/bin/bash
michael@rp3:~ $ cat /etc/group | grep 'apt|logger|root|michael'
root:x:0:
michael:x:1001:
wireshark:x:114:michael
logger:x:1000:
michael@rp3:~ $ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL
michael ALL=(ALL:ALL) ALL
anton ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
michael@rp3:~ $ ls -l /etc/sudoers.d
total 8
-r--r----- 1 root root 27 Oct 18 2016 010_pi-nopasswd
-r--r----- 1 root root 958 Jan 11 2016 README
michael@rp3:~ $ sudo cat /etc/sudoers.d/*
pi ALL=(ALL) NOPASSWD: ALL
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
# #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because sudoers contents can vary widely, no attempt is
# made to add this directive to existing sudoers files on upgrade. Feel free
# to add the above directive to the end of your /etc/sudoers file to enable
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
michael@rp3:~ $








share|improve this question













share|improve this question




share|improve this question








edited Dec 23 '17 at 19:02

























asked Dec 23 '17 at 17:19









user1032531

518621




518621











  • what groupid has logger on your system? maybe your group ids got mixed up
    – arved
    Dec 23 '17 at 19:46
















  • what groupid has logger on your system? maybe your group ids got mixed up
    – arved
    Dec 23 '17 at 19:46















what groupid has logger on your system? maybe your group ids got mixed up
– arved
Dec 23 '17 at 19:46




what groupid has logger on your system? maybe your group ids got mixed up
– arved
Dec 23 '17 at 19:46










2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted










apt-get, or rather dpkg, installs package contents using whatever user is recorded as owning the various files in the package. This is typically root:root, but can be anything; you’ll commonly see root:games in game packages, root:www-data for certain directories in web-server-related packages, etc. (Ownership and permissions can also be set by maintainer scripts, but that’s usually not necessary.)



If a package is created manually on a Raspberry Pi-style system, without paying too much attention to ownership (and not using fakeroot), it would perfectly be possible to end up with a package containing files owned by pi:pi, identified numerically. On your system, these would end up belonging to logger:logger.



You can see the ownership information contained in a packages by using dpkg-deb -c.






share|improve this answer






















  • Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
    – user1032531
    Dec 24 '17 at 14:09






  • 1




    Yes, you’re not supposed to produce packages whose files are owned by non-system users.
    – Stephen Kitt
    Dec 24 '17 at 14:20

















up vote
4
down vote













Debian packages can set file permissions and ownership in their postinst script.






share|improve this answer




















  • I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
    – user1032531
    Dec 23 '17 at 19:06










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412700%2fwhat-user-does-apt-get-install-software-under%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










apt-get, or rather dpkg, installs package contents using whatever user is recorded as owning the various files in the package. This is typically root:root, but can be anything; you’ll commonly see root:games in game packages, root:www-data for certain directories in web-server-related packages, etc. (Ownership and permissions can also be set by maintainer scripts, but that’s usually not necessary.)



If a package is created manually on a Raspberry Pi-style system, without paying too much attention to ownership (and not using fakeroot), it would perfectly be possible to end up with a package containing files owned by pi:pi, identified numerically. On your system, these would end up belonging to logger:logger.



You can see the ownership information contained in a packages by using dpkg-deb -c.






share|improve this answer






















  • Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
    – user1032531
    Dec 24 '17 at 14:09






  • 1




    Yes, you’re not supposed to produce packages whose files are owned by non-system users.
    – Stephen Kitt
    Dec 24 '17 at 14:20














up vote
3
down vote



accepted










apt-get, or rather dpkg, installs package contents using whatever user is recorded as owning the various files in the package. This is typically root:root, but can be anything; you’ll commonly see root:games in game packages, root:www-data for certain directories in web-server-related packages, etc. (Ownership and permissions can also be set by maintainer scripts, but that’s usually not necessary.)



If a package is created manually on a Raspberry Pi-style system, without paying too much attention to ownership (and not using fakeroot), it would perfectly be possible to end up with a package containing files owned by pi:pi, identified numerically. On your system, these would end up belonging to logger:logger.



You can see the ownership information contained in a packages by using dpkg-deb -c.






share|improve this answer






















  • Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
    – user1032531
    Dec 24 '17 at 14:09






  • 1




    Yes, you’re not supposed to produce packages whose files are owned by non-system users.
    – Stephen Kitt
    Dec 24 '17 at 14:20












up vote
3
down vote



accepted







up vote
3
down vote



accepted






apt-get, or rather dpkg, installs package contents using whatever user is recorded as owning the various files in the package. This is typically root:root, but can be anything; you’ll commonly see root:games in game packages, root:www-data for certain directories in web-server-related packages, etc. (Ownership and permissions can also be set by maintainer scripts, but that’s usually not necessary.)



If a package is created manually on a Raspberry Pi-style system, without paying too much attention to ownership (and not using fakeroot), it would perfectly be possible to end up with a package containing files owned by pi:pi, identified numerically. On your system, these would end up belonging to logger:logger.



You can see the ownership information contained in a packages by using dpkg-deb -c.






share|improve this answer














apt-get, or rather dpkg, installs package contents using whatever user is recorded as owning the various files in the package. This is typically root:root, but can be anything; you’ll commonly see root:games in game packages, root:www-data for certain directories in web-server-related packages, etc. (Ownership and permissions can also be set by maintainer scripts, but that’s usually not necessary.)



If a package is created manually on a Raspberry Pi-style system, without paying too much attention to ownership (and not using fakeroot), it would perfectly be possible to end up with a package containing files owned by pi:pi, identified numerically. On your system, these would end up belonging to logger:logger.



You can see the ownership information contained in a packages by using dpkg-deb -c.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 23 '17 at 21:29

























answered Dec 23 '17 at 21:00









Stephen Kitt

143k22308371




143k22308371











  • Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
    – user1032531
    Dec 24 '17 at 14:09






  • 1




    Yes, you’re not supposed to produce packages whose files are owned by non-system users.
    – Stephen Kitt
    Dec 24 '17 at 14:20
















  • Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
    – user1032531
    Dec 24 '17 at 14:09






  • 1




    Yes, you’re not supposed to produce packages whose files are owned by non-system users.
    – Stephen Kitt
    Dec 24 '17 at 14:20















Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
– user1032531
Dec 24 '17 at 14:09




Thank you Stephen, Before getting your answer, I removed the package (with and without using purge), deleted user logger, rebooted, reinstalled, and now user:group are both 1000 (old pi's and then old logger's numerically id). Then, I used dpkg-deb -c /var/cache/apt/archives/thepackage.deb, and I see the file owner/group is michaelOnServerWhoBuiltPackage, and as you likely expect, this user's id/groupId is 1000. I expect/hope this is not expected behavior as it arbitrarily gives ownership of files based on chance that user's on the two machines have the same numerical user id.
– user1032531
Dec 24 '17 at 14:09




1




1




Yes, you’re not supposed to produce packages whose files are owned by non-system users.
– Stephen Kitt
Dec 24 '17 at 14:20




Yes, you’re not supposed to produce packages whose files are owned by non-system users.
– Stephen Kitt
Dec 24 '17 at 14:20












up vote
4
down vote













Debian packages can set file permissions and ownership in their postinst script.






share|improve this answer




















  • I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
    – user1032531
    Dec 23 '17 at 19:06














up vote
4
down vote













Debian packages can set file permissions and ownership in their postinst script.






share|improve this answer




















  • I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
    – user1032531
    Dec 23 '17 at 19:06












up vote
4
down vote










up vote
4
down vote









Debian packages can set file permissions and ownership in their postinst script.






share|improve this answer












Debian packages can set file permissions and ownership in their postinst script.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 23 '17 at 17:51









jdwolf

2,392116




2,392116











  • I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
    – user1032531
    Dec 23 '17 at 19:06
















  • I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
    – user1032531
    Dec 23 '17 at 19:06















I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
– user1032531
Dec 23 '17 at 19:06




I had preinst and postinst and postrm scripts associated with the file, but they do not change the owner/group. Interesting, they too had user/group "logger". I then used apt-get to remove the package and then physically removed the pre/post inst/rm files, and finally reinstalled, and they again have the same user/group. While these type of files "can" do such a thing, they are not in my case.
– user1032531
Dec 23 '17 at 19:06












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412700%2fwhat-user-does-apt-get-install-software-under%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay