Micro tries to create log.txt on working directory every time it is opened

Bug #1870939 reported by Leonardo Müller
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
micro (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Confirmed
Medium
Utkarsh Gupta

Bug Description

Micro is creating a log.txt file on the working directory every time it is opened. Not only this creates an extra file, but this can cause micro to fail to open. For example:

/etc/default$ micro grub
2020/04/05 12:47:49 error opening file: open log.txt: permission denied

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: micro 2.0.1-1
Uname: Linux 5.6.0+ x86_64
ApportVersion: 2.20.11-0ubuntu22
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Apr 5 12:46:42 2020
InstallationDate: Installed on 2017-06-13 (1026 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: micro
UpgradeStatus: Upgraded to focal on 2019-12-22 (104 days ago)
mtime.conffile..etc.apport.crashdb.conf: 2019-08-29T08:39:36.787240

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in micro (Ubuntu):
status: New → Confirmed
Revision history for this message
Sean Goheen (mrzx4l98d2-ubuntu-hwbqs6tox1) wrote :

It's really irritating having to clean up after using micro, and not being able to launch it from a directory that I don't have write access to. I've tried to set debug to false in the config file, but that doesn't work. Any ideas on how to fix this would be greatly appreciated.

Revision history for this message
Deevad (deevad) wrote :

@Sean: I used this way to reinstall micro and bypass the bug in repo:

$ sudo apt remove micro
$ sudo apt install curl
$ curl https://getmic.ro | bash
$ sudo mv micro /usr/bin/micro

Revision history for this message
RavenTai (raventai) wrote :

Had the same problem under Linux mint 20 cinnamon (uses Ubuntu repositories) my fix was to remove the repository version and install the .deb from GitHub. https://github.com/zyedidia/micro/releases

Revision history for this message
Chris Guiver (guiverc) wrote :

I was asked to test this

Recent Lubuntu 20.04.2 QA-test install, thus clean system.
`sudo apt install micro`

I started micro, played with editor entering & changing text.
On exit (without save) I did have a `micro.txt` in my $HOME, it contained "2020/11/30 20:47:25 Micro started" as contents.

I `cd /etc` as per original poster and obtained the identical error message the OP reported, as I don't have write access to that directory.

I can confirm issue.

Revision history for this message
Raman Sarda (theloudspeaker) wrote :

Changing the status to fix released. As the bug is rectified in versions of micro in groovy and in hirshute devel branch. Considering a SRU for focal.

Changed in micro (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Vaclav Petras (wenzeslaus) wrote :

Thank you! Although piping getmic.ro is interesting, update for focal would be great.

Revision history for this message
Justin Zobel (justin-zobel) wrote :

Not sure how it can be set to fix released if it's still an issue in LTS versions of Ubuntu?

Can we please backport this to all LTS releases?

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hello,

I am the maintainer of micro in Debian and thus here. I'll try to get this fixed in sometime. Thanks!

Changed in micro (Ubuntu Focal):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Utkarsh Gupta (utkarsh)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.