How should i do to undo this? I tried running fsck to solve my "Read only filesystem" before but it didn't help me much. It only solve the situation for a while and then it comes back again. So, i did this after reading a post.
Meanwhile, i am getting thousands of lines like this:
chown: changing group of '/usr/share/doc/distro-info-data': Read-only file system
chown: changing group of '/usr/share/doc/software-properties-common/copyright': Read-only file system
chown: changing group of '/usr/share/doc/software-properties-common/changelog.gz': Read-only file system
chown: changing group of '/usr/share/doc/software-properties-common': Read-only file system
chown: changing group of '/usr/share/doc/nmap/3rd-party-licenses.txt.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/leet-nmap-ascii-art.txt': Read-only file system
chown: changing group of '/usr/share/doc/nmap/nmap.usage.txt.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/device-types.txt.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/committers.txt.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/nmap_gpgkeys.txt.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/style/lua-format.lua.gz': Read-only file system
chown: changing group of '/usr/share/doc/nmap/style/README': Read-only file system
fsck
is the fix), so I don't know why you mentionedsudo chown ..
as it would create other problems though wouldn't change anything on a read-only file system anyway. Look at your logs to see why the file system was mounted or remounted read-only, and go from there.mount | grep "/dev/"
and check that the filesystems is indeed inro
mode, notrw
.