How can I get read and write permissions to a hard drive in Ubuntu Linux?

8,719

Solution 1

To install ntfs-3g in Ubuntu (since you use Ubuntu and not Arch), do

sudo apt-get install ntfs-3g

Then find the name of the HDD

sudo fdisk -l | grep NTFS

Edit the list of drives to be mounted after making a backup copy of the fstab file

sudo cp /etc/fstab /etc/fstab.bak
sudo nano /etc/fstab

And follow the examples in these instructions so the drive will be mounted R/W

Solution 2

You can use ntfs-3g to mount the (internal) drive read/write. If you intend to mount it automatically, make sure your fstab mounts it read/write.

See NTFS-3G opensource, and NTFS-3G for greater detail.

Share:
8,719

Related videos on Youtube

user3581363
Author by

user3581363

Updated on September 18, 2022

Comments

  • user3581363
    user3581363 over 1 year

    I have a rather unique situation:

    I have a laptop which boots its Linux OS (Ubuntu 18.04.2 LTS) from a USB drive.

    I also have a internal hard drive installed.

    I would like to edit the hard drive, but unfortunately, the drive is in "Read only" state.

    The disk has been "salvaged" from a dead Windows based pc (the OS was not installed on that particular drive).

    How can I have both Read and Write access to that HDD so i could edit some data in it?

    • somebody
      somebody almost 5 years
      Your question lacks required information to receive any valuable answer. How is the (internal) drive formatted? What are the permissions on the (internal) drive (user/group) owner(s)? At (least) these 2 questions must be addressed in your original question, to get a correct answer. :)
    • user3581363
      user3581363 almost 5 years
      I have "salvaged" the drive from a dead laptop which ren windows.When running "mount", i can see that the drive's user_id and group_id =0
    • somebody
      somebody almost 5 years
      You can use ntfs-3g to obtain read/write access on that drive. But you'll want to ensure it's mounted read/write in your fstab if you choose to mount it automatically.
    • user3581363
      user3581363 almost 5 years
      I know i can already backup the data i need from the drive, but i need to delete work related data before handing the dead laptop for repair. i would like to do so while preserving the rest of the data, so formatting is not an option.
    • somebody
      somebody almost 5 years
      If you use the ntfs-3g driver(s) I suggested, and mount the drive read/write. You will have no difficulty saving, deleting to/from the drive. It will work as any other "native" drive to your system. :)
  • user3581363
    user3581363 almost 5 years
    When i try to do that, i get the following error: 'The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Falling back to read-only mount because the NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting.)'
  • user3581363
    user3581363 almost 5 years
    Ok, i got over it by running "sudo ntfsfix". Now everything is fine again =) thanks guys!