[Bug 2004071] Re: falsche Berechtigungen in Standard-Installation Ubuntu 22.04.1 LTS 64bit

Marc Püschel 2004071 at bugs.launchpad.net
Fri Mar 10 23:47:57 UTC 2023


Oh and last but not least: if you upgrade ClamAV, my complete ClamAV
permissions will be overwritten. I don't understand, why this happened,
my permissions work well and I have good reasons why I changed it. This
behavior of apt(?) is a "no go". Please let the users permissions if
they upgrade only, untouched.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2004071

Title:
  falsche Berechtigungen in Standard-Installation Ubuntu 22.04.1 LTS
  64bit

Status in ubuntu-release-upgrader package in Ubuntu:
  New

Bug description:
  The default installation of Ubuntu 22.04.1 LTS (installed from a USB
  stick) unfortunately assigns incorrect permissions.

  If you want to create a cronjob, it will NOT be executed due to the incorrectly set permissions!
  I had to research for a very long time to be able to solve the problem.

  The following path is used to store the cronjobs:

  /var/spool/cron/crontabs

  and the folder crontabs needs the right 0755 owner root and group crontab can stay.
  What the default right is here, I regretfully don't remember.
  Fact: the default permission was wrong, otherwise I would not have had to change it.

  Because of this, the file is saved with wrong permission inside the
  folder (created with the nano-editor) and monted by the service cron
  ("insecure mode" "0600 expected" is then written in the log) and
  simply ignored.

  So you have to set the folder crontabs as su to 0755 and then your own
  cronjobfile as su to 0600 and owner "sudo name" (group root can stay)!

  Then you log out with exit from the terminal as su and must set these
  permissions exactly the same again, only this time NOT as su, but as
  sudo.

  Only then the service cron fetches the cronjobfile correctly and
  executes it!

  Another permissions problem: If you install clamav as sudo, in the
  folder /etc/init.d the daemons:

  - clamav-daemon
  - clamav-freshclam
  - clamav-milter

  are created.

  Again, the default permissions are wrong!

  Default is, for whatever reason here 0644, but these MUST be able to run as programs (for all users) and therefore need the permission 0755, also this must be changed as su, because root is the owner.
  If you don't change these permissions, these daemons simply don't work and you can't use clamav!

  Also here I had to research and "try around" for a very long time
  until I knew why e.g. personal whitelists are simply not read by
  clamav.

  So clamav requires working and executable daemons!

  Do you really have to expect a standard user to know how to set up a
  su and how and where to change what values to be able to use it?

  Again: without changing these permissions as su, no cronjobs are
  possible, and you can not use clamav.

  Unfortunately I do not know which user to notify here in this case, so
  i have selected Ubuntu BugBot

  ----------

  Bei der Standardinstallation von Ubuntu 22.04.1 LTS (von einem USB-
  Stick installiert) werden leider falsche Rechte vergeben.

  Möchte man einen Cronjob anlegen, wird dieser durch die falsch gesetzten Rechte NICHT ausgeführt!
  Ich musste sehr lange recherchieren, um das Problem lösen zu können.

  Folgender Pfad zum Speichern der Cronjobs wird verwendet:

  /var/spool/cron/crontabs

  und der Ordner crontabs braucht das Recht 0755 owner root und group crontab kann bleiben.
  Was das Standardrecht hier ist, weiß ich bedauerlicherweise nicht mehr.
  Fakt: das Standardrecht war falsch, sonst hätte ich es nicht ändern müssen.

  Dadurch wird auch innerhalb des Ordners die Datei mit falschen Rechten
  gespeichert (mit dem nano-editor erstellt) und vom service cron
  moniert ("insecure mode" "0600 expected" steht dann im Log) und
  schlicht ignoriert.

  Also muss man zuerst als su den Ordner crontabs auf 0755 und dann das
  eigene Cronjobfile als su auf 0600 und owner "sudo name" (group root
  kann bleiben) setzen!

  Dann loggt man sich mit exit aus dem Terminal als su aus und muss
  diese Rechte exakt nochmal genauso setzen, nur dieses Mal NICHT als
  su, sondern als sudo.

  Erst danach holt sich der service cron korrekt das Cronjobfile und
  führt es aus!

  Weiteres Rechteproblem: Installiert man als sudo clamav, werden im
  Ordner /etc/init.d die Daemons:

  - clamav-daemon
  - clamav-freshclam
  - clamav-milter

  angelegt.

  Auch hier sind die Standardrechte falsch!

  Default ist, warum auch immer hier 0644, aber diese MÜSSEN als Programme laufen können und benötigen somit das Recht 0755, auch das muss man als su ändern, da root der Eigentümer ist.
  Ändert man diese Rechte nicht, funktionieren diese Daemons schlicht nicht und man kann clamav nicht nutzen!

  Auch hier musste ich sehr lange recherchieren und "herumprobieren" bis
  ich wusste, woran es liegt, dass z. B. persönliche whitelists von
  clamav schlicht nicht gelesen werden.

  Somit setzt clamav funktionierende und als Programm ausführbare
  Daemons vorraus!

  Muss man von einem Standardanwender wirklich erwarten können, dass er
  weiß, wie man einen su einrichtet und wie und wo auf welche Werte man
  was ändern muss, damit man das nutzen kann?

  Nochmal: ohne ändern dieser Berechtigungen als su sind keine cronjobs
  möglich und man kann auch clamav nicht nutzen.

  Leider weiß ich nicht, welchen user ich hier in diesem Fall
  benachrichtigen soll, daher habe ich den Ubuntu BugBot hinzugefügt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2004071/+subscriptions




More information about the foundations-bugs mailing list