0

I'm running MX Linux 21 and recently installed PostgreSQL-13; I wanted postgres to have read, write and execute access to a certain folder therefore I added the unix user postgres to the group of owner and granted such accesses to the group. The commands was: setfacl -R -m u:postgres:rwx myfolder

Then I uninstalled postgresql from MX package manager completely (i.e., sudo apt remove postgresql-13).

I thought the unix user called postgres should be gone with the removal of postgresql, it however was not the case. I am still able to do sudo su postgres and logged in as the user postgres.

I then did sudo deluser postgres and it failed with exit code 8, saying there's process still running on postgres.

I then did a ps -ef and found that sudo su postgres is the main process that held up the deletion of user postgres. I killed that process in htop and ran sudo deluser postgres again with success.

But when I checked with getfacl to see if the unix user postgres has been deleted from the user group, I found this:

$ getfacl myfolder
# file: owner
# owner: owner
# group: owner
user::rwx
user:121:rw-
group::rwx
mask::rwx
other::r-x

that user:121 is in place of user postgres. Does this mean installing postgres is leaving a trace in my system and I can't purge it? Does this mean installing postgres would always make an user postgres in my system and if I don't delete it, it'll be there forever?

2
  • 2
    "that user:121 is in place of user postgres" of course it is, because of you did setfacl earlier, and didn't setfacl -x to remove that access back. Dec 15, 2022 at 7:09
  • @RabbanKeyak Thanks that's the command I am looking for; like you said, I should really check the man page first. Your comment should be the answer, whenever you are free then.
    – stucash
    Dec 15, 2022 at 23:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.