Accessing files created in Ubuntu (on an NTFS drive!) from Windows 7

Status
Not open for further replies.

herekitty

Distinguished
Jul 10, 2011
4
0
18,510
Hello there,

So I followed instructions from Lifehacker's dual boot Windows 7/Ubuntu guide with some of my own modifications and my system works pretty well. I have my drive partitioned into several parts: System Reserved for Windows stuff, a 25 gig partition for the Windows install and programs, a 20 gig extended partition for Linux (split into 17 gigs for the Ubuntu install and 3 gigs for Linux swap), and a large partition for storage of media files and documents. All but the extended Linux partition are NTFS formatted.

I've had no trouble reading files from the NTFS storage partition when I'm booted into Linux, but I discovered recently that any files I create or move/copy onto that NTFS storage partition while booted into Linux are invisible if I boot back into Windows 7. It doesn't have to do with the file types - image files, movies, no matter what type of file it is, if it's been moved or created in Linux I can't see it in Windows. They're always still there, though, if I boot back into Linux. However, files that I create in Windows and subsequently modify in Linux are still visible if I boot back into Windows.

I'm supremely mystified by this and could use some advice! Thanks.
 
Sounds to me like a permissions problem. When you create the files from Linux they don't know anything about Windows users so it may be that no-one has permission to view them. What permissions do the files have when viewed from the Linux side?

Try opening Exporer as the Administrator (the Administrator, not just someone who is an Administrator) and see if you can see the files and look at their permissions.
 

meuchel

Distinguished
Jan 7, 2011
45
0
18,540
open the folder
go to organize in the top left(usually)
click on the view tab
put a dot in show hidden files folders and drives
uncheck hide protected operating system files
it is possible linux is mis flagging the files as system or hidden.
if you can see them then you need to find out what flag the files have.
in a windows command prompt navigate to the folder with the files and run
attrib -h filename
or
attrib -s filename
to turn of the respective flags
 

herekitty

Distinguished
Jul 10, 2011
4
0
18,510
Thanks for the responses. I already have hidden folders set to display. I tried opening Explorer as and Administrator, and that didn't work. Also trying to change the file attributes via the Windows command line didn't have any results (it returned "File not found"). I imagine reassigning the permissions of the whole drive might work, but it makes remounting the drive in Ubuntu a pain and I'd rather not have to do that every time I create a file in Linux...

I think the issue is indeed that Linux doesn't assign the individual files some parameter Windows needs to see them, meuchel...but surely if read/write is enabled for Ubuntu via FUSE someone must have figured out how to write files that aren't hidden in Windows...
 

chamaecyparis

Distinguished
Nov 21, 2010
321
0
18,810
I would not "sully" any linux with NTFS! IMHExperience, they don't play well together. In fact to install a Slackware-based distro on a hdd that once contained that dirty FS, I have to wipe the drive with zeros first! This is whay I recommend to hewbies to use the

dd if=/dev/zero of=/dev/sda bs=4096 conv=notrunc,sync

command to clean the hdd before any installation of any linux distro, even though it may seem like overkill to many who have not experienced anything besides ubuntu!

Recommend using FAT32 (format with gparted or PartedMagic, as Windows refuses to do this!) for a partition where it is desired to share files between the two OSs.

If fault is to be laid anywhere, lay it at MS's doorstep! :non:
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360


QFT, when I used to keep a version of Windows installed on my machines I'd always use a FAT32 "bridge" partition and live with the consequences (filesize limit) since it was simply better supported between both OSs
 

herekitty

Distinguished
Jul 10, 2011
4
0
18,510
Yeah, the file size limit is an issue for me. I work with big video files, so I can't use FAT32.

In a new twist to this problem, I've discovered that the files DO become visible on the Windows side of things eventually. Here's the scenario:

1. I created a text file while booted in Ubuntu, and saved it to my NTFS-formatted
Storage partition.
2. I booted into Windows 7. File is conspicuously absent, despite my trying above suggestions (opening Explorer as Administrator, changing partition permissions, even searching for the docs by name).
3. Booted back into Ubuntu in the course of my daily life.
4. Booted back into Windows to discover file I originally created is now visible.

This happened on two different occasions with two different test files - I wasn't expecting it so I only noticed after the second one magically appeared again in Windows. [As a side note, because I was booting back and forth in the course of a regular day I think I also mounted and unmounted some USB drives in Ubuntu and/or Windows. I don't know if that's significant at all.]

Anyone have any clue what's going on? At this point, I'm just plain curious. Also it would be cool to find a solution that means I don't have to worry about booting back and forth twice to see my new files created in Ubuntu.
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
Just a cursory googling turns up that a few people have run into this kind of issue before, and considering the slight bumps in features MS has made in the FS from NT to 7, it's not too surprising, and unfortunately I found no solutions in the quick outing.

I think if I were faced with this issue I'd consider setting up a NAS that has an underlying FS that can support the needed filesizes (I'd personally use my GbE-connected server, but that's already setup), although the access times could be a killer (unsure how regularly you need to shuttle data back and forth)
 

herekitty

Distinguished
Jul 10, 2011
4
0
18,510
It's good to know that other people had the issue too (I'm curious - what did you search for? I def couldn't find concise/precise enough terms to discover anyone else with my problem via google).

Thanks!
 

robkers1993

Honorable
Feb 26, 2012
2
0
10,510
Hi there!

I had the same problem in my system with one physical hard drive, partitioned into 3 seperate partitions (Windows, Ubuntu and Data). The windows and data partitions are in NTFS and Ubuntu in ext4.

I saw that the SMART status of my disk gave an error in Ubuntu. So i shut down ubuntu and booted in Windows. Then i checked my Data partition on bad sectors using "Error checking" under Disk properties -> Tools. Cekck "Automatically fix file system errors" and "scan for and attempt recovery of bad sectors" and hit start. This took a while, but in the end i got an overview of what was wrong with my partiton and the nice message that all problems were fixed. And indeed I was finally able to view the files i created under Ubuntu.

I didn't check if this is a solution for the long run, but for now it works :)

I also read that that the disk can get confused if you run Ubuntu and hibernate Ubuntu and then startup windows (or vica versa). I will check if this is true in the following days.
Someone also had some problems with the caching of his/her disk. Didnt check that out yet:
http://askubuntu.com/questions/84101/seeing-ubuntu-made-files-on-an-ntfs-partition-from-within-windows-7

Hopefully this information will help you,

Rob
 
Status
Not open for further replies.