0

I have installed ubuntu 18.04.3 LTS in my system 3 months ago. After 2 months, I don't have the read and write permission on any internal drive except my system drive. I have used chmod -R 777 * in all 4 internal drives. Still I am not able to get the write permission. Every time I use chmod -R 777 *, It sets read only permission to every file.

That's the console output I am getting.

chmod: changing permissions of 'filename.jpg': Read-only file system

chmod: changing permissions of 'filename.mp4': Read-only file system

Content of /etc/fstab file:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#                
# / was on /dev/sda8 during installation
UUID=659a2d1e-22aa-4ea8-a2fe-95e725d1b4c3 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda9 during installation
UUID=229f248a-cec6-40bc-bed9-6a1f1baf8deb none            swap    sw              0       0

Log of mount | grep '^/' :

/dev/sda8 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/var/lib/snapd/snaps/gnome-system-monitor_100.snap on /snap/gnome-system-monitor/100 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1313.snap on /snap/gtk-common-themes/1313 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1198.snap on /snap/gtk-common-themes/1198 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_352.snap on /snap/gnome-calculator/352 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_61.snap on /snap/gnome-logs/61 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_71.snap on /snap/gnome-3-28-1804/71 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_67.snap on /snap/gnome-3-28-1804/67 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_57.snap on /snap/gnome-logs/57 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_7396.snap on /snap/core/7396 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_90.snap on /snap/gnome-3-26-1604/90 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_45.snap on /snap/gnome-logs/45 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_406.snap on /snap/gnome-calculator/406 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1098.snap on /snap/core18/1098 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1074.snap on /snap/core18/1074 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_92.snap on /snap/gnome-3-26-1604/92 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_296.snap on /snap/gnome-characters/296 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_83.snap on /snap/gnome-system-monitor/83 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_7270.snap on /snap/core/7270 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_317.snap on /snap/gnome-characters/317 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_260.snap on /snap/gnome-calculator/260 type squashfs (ro,nodev,relatime,x-gdu.hide)
/dev/sda2 on /media/tango/78CE2C0ECE2BC36C type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sda3 on /media/tango/tiMe FoR JaaNkAaRi type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sda5 on /media/tango/gEEks-StuffS type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sda6 on /media/tango/ManOraNjaN type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sda7 on /media/tango/coMPuteR_aUJaaR type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
  • 4
    First off, never just blindly run chmod -R 777 on an entire drive! That could easily break your system! That said, please [edit] your question and add i) the contents of the /etc/fstab file and ii) the output of mount | grep '^/'. – terdon Sep 07 '19 at 16:31
  • @terdon Since I am new to ubuntu and its community , I could not embedded the screenshot, So I'd attached the link of screenshot. – Harsh tango Gautam Sep 08 '19 at 18:45
  • No, please paste the actual text. It's text, you can just copy paste it. A screenshot is much more complicated and is harder to read. Please just copy paste the contents into your question. – terdon Sep 08 '19 at 19:04
  • Also, please explain what drives you're asking about. I only see one drive in the screenshot. – terdon Sep 08 '19 at 19:06
  • @tredon I am asking for all the available drive. Earlier I did not mount any drive except one. That's why you were seeing only one drive. – Harsh tango Gautam Sep 09 '19 at 16:48
  • Do you mean partitions? Windows uses "drives" incorrectly as sda2 could be D: drive or sdb1 could be D: drive. And if NTFS partition which your fuseblk probably indicates, the issue is that Linux chmod & chown commands do not work on Microsoft formats. You only set defaults when mounted. And if Windows is hibernated/fast start up on, then read only is only mount allowed to prevent damage to hibernation. See: http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions & https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation – oldfred Sep 09 '19 at 17:18
  • Hi @terdon Thanks for clearing the doubt about mount and saving me from breaking my system by using chmod -R 777. – Harsh tango Gautam Sep 21 '19 at 16:46
  • Glad I could help. The answer below should explain the issue. Also oldfred's comment above. – terdon Sep 21 '19 at 16:48
  • Hi @oldfred, Actually I always hibernate my windows before going to ubuntu. When I shutdown my windows, I was able to save my work on ubuntu. Earlier ubuntu versions don't have this damage protection. Thanks for solution. – Harsh tango Gautam Sep 21 '19 at 16:49
  • If you want to hibernate Windows you can only manually mount NTFS partitions as Read Only (ro). And I think all the automatic mounts are read/write (rw), so do not work. If internal drives you can add the ro parameter to the recommended parameters for mounting NTFS. If external you can manually mount. https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation – oldfred Sep 21 '19 at 17:24

1 Answers1

1

each of the sda 2-7 drives are mounted ReadOnly. chmod isn't able to change the file system, because it's mounted ReadOnly. "ro" in the options shows it's read only.

/dev/sda2 on /media/tango/78CE2C0ECE2BC36C type fuseblk (ro,nosuid, ...
/dev/sda3 on /media/tango/tiMe FoR JaaNkAaRi type fuseblk (ro,nosuid, ...
/dev/sda5 on /media/tango/gEEks-StuffS type fuseblk (ro,nosuid, ...
/dev/sda6 on /media/tango/ManOraNjaN type fuseblk (ro,nosuid, ...
/dev/sda7 on /media/tango/coMPuteR_aUJaaR type fuseblk (ro,nosuid...

Are these drives mounted automatically by gnome?

  • No @Dave Smith, these drives were mounted by me. Whenever I wanna use any, I mount them. It happened because I hibernated my windows while going to ubuntu. – Harsh tango Gautam Sep 21 '19 at 16:55