Month: December 2021

mesg: ttyname failed: Inappropriate ioctl for device

While running a cron job in Linux, I sometimes get this error and I had been struggling to solve this until I came across this post.

Although that particular post mentions the cause being Vagrant, mine was due to a cron job.

First the solution …

Modify .profile under home folder

Open ~/.profile

Replace the following line –

mesg n || true

with

tty -s && mesg n

The reason for this is given very well in the post linked above.

Continue reading

Copyright © 2024 the möbius trip

Theme by Anders NorenUp ↑