1

I've installed Ubuntu 18.04 LTS alongside Windows 10. I can access the Windows partition and can read the files. But I can't create any files or folders in that partition. All the options for "Cut", "Move to" and "Rename" are greyed out. How can I have write access to the partition from Ubuntu?

The output for df -H command The output for <code>df -H</code> command

The contents of fstab file The contents of fstab file

The output for sudo lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,LABEL The output for `sudo lsblk

20B2
  • 111
  • you probably just need to change the permissions from command line. if you post the output of "df -H" and the contents of your /etc/fstab file, I should be able to formulate an answer for you. – Joshua Besneatte Jul 17 '18 at 17:19
  • Please don't post pictures of text. Instead, copy-paste the text, and use the formatting tools to make it look nice. (For details, see the formatting guide and Why do people post screenshots of their terminals?) – wjandrea Jul 17 '18 at 17:40
  • @JoshuaBesneatte I'm edited the question including the screenshots for the contents you mentioned. – 20B2 Jul 17 '18 at 17:40
  • This seems likely a hibernation issue, See https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation and if that is the issue, this question is a duplicate. – DrMoishe Pippik Jul 17 '18 at 17:46
  • @20B2 Please post the output of sudo lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,LABEL – wjandrea Jul 17 '18 at 17:47
  • @wjandrea sorry for the screenshots but it seems easier now, I'll edit the question using text later. – 20B2 Jul 17 '18 at 17:56
  • @20B2 OK, sounds good. From the output, I would guess sda2 is your Windows partition, but it could also be sdb4. If you mount the partition first, we could tell better. – wjandrea Jul 17 '18 at 18:00
  • @wjandrea yes sda2 and sdb4 both are the windows partitions, sdb4 is the C: drive for windows. I would like to be able to write to sda2 partition using both Windows as well as Ubuntu – 20B2 Jul 17 '18 at 18:13
  • Generally best to set Windows c: drive as read only. And then have a NTFS shared data partition as read/write. Newer versions of Windows with fast start up/hibernation will also keep NTFS data partition hibernated, so you still have to have hibernation off. http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions I used to change my Windows settings to show hidden files & often accidently moved or deleted something critical. The Linux NTFS driver defaults to all files & partitions shown, so you have to be careful if you want write access on c: drive. – oldfred Jul 17 '18 at 20:02

2 Answers2

0

This generally happens

  1. When your Windows is not fully turned off and you booted into Linux.
  2. If hibernation is turned on in Windows and you booted into Linux.

and if you try to access your windows drives from ubuntu in these 2 cases then you will have only read access.

So, there are 2 solutions for this.

  • If the issue is because of not fully turned off Windows, then you can start your windows and this time when you shutdown your computer by holding shift. And remember use only shutdown, don’t restart it.
  • If the issue is because of hibernation in Windows, then also you need to start your windows and then open command prompt in administrator mode and then type the command powercfg.exe /hibernate off And also untick the Turn on fast startup option in control panel -> Power Options. Now shutdown windows and start your Ubuntu, and you can have write access.

This should solve the problem.

Subhash
  • 191
-2

There are two reasons that I can think of why you can't use your Windows partition. Windows often has an issue with hanging on to the partition if it is not shut down completely. Holding down the shift key while shutting down Windows should fix this problem. If you don't want to completely turn off your computer to boot into Windows to completely shut it down and reboot again, I'd check out this answer here.

However, since you are able to read it, this sounds more like a problem with permissions. Go ahead and check out this article to find out how to mount your NTFS Windows partition to enable permissions. I'd also suggest checking out some of the other links that other users have been suggesting under your comments.

Then, open up your terminal and type up sudo nautilus and then left click on your Windows partition once the file manager pops up. Select Properties and then navigate to the Permissions tab. Then change the Owner and/or Group to your username. Then hit the Change Permissions for Enclosed Files... button on the bottom of the properties window. Then change the Files and Folders permissions to Read and Write for the Owner or Group, whatever you changed earlier.

You can also do the same thing all in the terminal with chown and chmod but that's another answer.

  • 1
    -1 Don't use sudo nautilus, use pkexec nautilus if you need to, but you don't, since for NTFS partitions, permissions are set during mount and cannot be changed without remounting. – wjandrea Jul 17 '18 at 17:49
  • @wjandrea Oh, I see what you mean. You can still use chmod and chown on it but the permissions option needs to be set when it is mounted, at least according to this article. – BobserLuck Jul 17 '18 at 17:59