0

In my computer I have many drives I installed Windows 10 and Ubuntu 18.04 dual boot. The problem is I am not able to modify (write) Windows drive files.

: mkdir: cannot create directory ‘foldername’: Read-only file system
Zanna
  • 69,223
  • 56
  • 216
  • 327
  • thanks for ur comment...how can i install ntfs-3g in ubuntu 18.04 – Lokesh Pandey May 05 '18 at 20:23
  • with: `sudo apt-get install ntfs-3g` – itssme May 05 '18 at 20:27
  • its not working can u give me step by step process – Lokesh Pandey May 05 '18 at 20:30
  • i am using ubuntu 18.04 lts 64 bit – Lokesh Pandey May 05 '18 at 20:31
  • 1
    `ntfs-3g` is installed by default in Ubuntu these days, so that won't solve this problem – Zanna May 05 '18 at 20:52
  • 1
    [unlock ntfs partition](https://superuser.com/questions/964402/is-there-anyway-to-unlock-hibernated-ntfs-partition#964459) and [unable to mount windows partition](https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation#145904) might help. The problem could be that your ntfs partition is in hibernation state. This happens when windows doesn't shutdown correctly or if windows was in hibernation an the power got cut. If that is the case I would recommend booting into windows and then shutting it down completely again. – itssme May 06 '18 at 11:39

1 Answers1

0

The most common problem is the sudo in the mounting for the share, which is required for the mounting command. After the mounting, the share belongs to root and you can't write to it. You can remedy this by providing with uid=[your Ubuntu uid]. This is proving write access to you.

You also have to make sure that the user under username= and password= have write permission provided by the Windows server.

Make sure you include these parameters in your mounting options:

  • uid=[your Ubuntu UID #]
  • username=[Real user on the Windows 10 machine]

Example:

$ sudo mount -t cifs -o username="ljames",uid=1001 //192.168.15.84/c /mnt

Windows 10 have an option to login with your email address that is registered with Microsoft. In this case (which you may already know since you're able to mount the share), but for general knowledge, this will be done by:

$ sudo mount -t cifs -o username="ljames@outlook.com",uid=1001 //192.168.15.84/c /mnt

There are many options that can be specified in the command line (or in the /etc/fstab file) such as:

  • file_mode=0660
  • dir_mode=0775

Those options goes after the -o options argument, separated by the comma.

L. D. James
  • 24,768
  • 10
  • 68
  • 116