Originally Posted by swapnshukla
This looks like that user issuing shutdown command is not eligible to work with /var directory (Read Only file system)
There might be a chance of your /var file systems curruption so you can try running fsck to the /var and then do to shutdown.
Activities performed with rm during shutdown are normal but finding Read Only Filesystem is not.
The shutdown command can only be run with root privileges:
c@CW8:~$ shutdown now
shutdown: Need to be root
All the directories listed in the rm error messages are not on the /var/ file system; they are on temporary file systems (tmpfs) in memory, mounted in the /var file system
c@CW8:~$ df -t tmpfs
Filesystem 1K-blocks Used Available Use% Mounted on
varrun 1684452 236 1684216 1% /var/run
varlock 1684452 4 1684448 1% /var/lock
I guess it's normal to try and remove these things during shutdown. The issue is not that any harm is being done to the /var/run and /var/lock file systems (they disappear when the power is off) but that the daemons mentioned in the error messages are not able to shut down normally. They may or may not continue shutting down normally after the rm error, depending on how their shutdown (kill) scripts are programmed.
I have no idea how /var/run and /var/lock have become read-only. Are there any clues in the /var/log files like kern.log, daemon.log, messages and syslog?