0

This question is somewhat similar to How to use Windows Share has home directory, but in this case Windows is not running.

I have installed a dual-boot configuration with Ubuntu 12.04 and Windows. My Windows partition is mounted on /C. Now I want either Ubuntu to locate home directories in

/C/Users

Which is the location of windows accounts

or I want Windows to use

D:\home

for home directories. (D is the name of the Ubuntu root directory).

For the first approach, I have managed to create a test user account

test-user:x:1004:1001:Test:/C/Users/test-user:/bin/bash

The account works but test-user cannot run any X session. From .xsession-errors

chmod: Changing rights on ”/C/Users/test-user/.xsession-errors”: Operation not permitted

Would it help get rid of that chmod, which has no effect? How do I?

If I use the second approach, I need the Ext2fsd driver, which seems to work, but I am not sure if Windows maps the Ext2 system that early.

Here is my fstab

proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=e7cef061-ed8d-4a82-b708-0c8f4c6f297f /               ext3    errors=remount-ro 0       1
UUID=2CDCEB43DCEB0644 /C              ntfs    defaults,umask=007,gid=46 0       0
UUID=b087b5c0-b4bd-47e7-8d34-48ad9b192328 none            swap    sw              0       0

Update: I found something here: http://www.tuxera.com/community/ntfs-3g-advanced/ Will work if i do a correct mapping between NT users and Linux users.

  • Has test-user chowned /C/Users/test-user? And since the drive is shared with Windows, I guess it's NTFS-formatted, right? So have you mounted it with exec permission? otherwise no executable will run from there. – Samik Jul 4 '12 at 9:57
  • The owner of the entire /C directory is root and ownership cannot be changed. Everyone in the plugdev group (test-user is member of this group) can read, write and execute files on this drive. – user877329 Jul 4 '12 at 11:07
  • It's a bad idea to have the home directories on a NTFS partition. Windows won't use them as home directories either. If intended for data being exchangable from both systems, I'd rather recommend using a separate drive/partition for that data. For linux specific things better use a file system native to Linux. – Izzy Jul 4 '12 at 11:45
  • 1
    @user877329 ownership cannot be changed because you have not mentioned permissions option in your /etc/fstab. Once you do that (and preferably change the filesystem type to ntfs-3g) the partition will be mounted using standard Linux permission and then you'll be able to chown and chmod each file/directory as normal. – Samik Jul 4 '12 at 11:49
  • Keep in mint that Linux permissions do not work on non-Linux file systems, NTFS, for example, which means that chmoding and chowning wouldn't make sense. I agree with lzzy, putting home dirs on a non-Linux file system is a bad idea. – mikewhatever Jul 4 '12 at 12:42
2

Better not to mix home directories.

Home directory in Windows holds activation data - if something goes wrong you have to reactivate Windows !

Software products are creating "hidden" subdirectories in home folder - in Linux and in Windows !

Separate folder for common data is another thing.

I am using ext2fsd but really don't know at what point ext2fsd is available - its implementation is - native driver activated over a service if you use permanent drive mappings.

  • 1
    Better not to mix home directories: Mixing improves my workflow. Home directory in Windows holds activation data - if something goes wrong you have to reactivate Windows !: Then it is better to not map the windows drive at all Software products are creating "hidden" subdirectories in home folder - in Linux and in Windows !: Yes, and some Linux apps ported to Windows will use the same name and therefore the settings will be shared, which is what I want. – user877329 Jul 4 '12 at 14:52
1

I think the easiest way is to just reroute in Windows (and use ext2fsd):

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/lsm_profile_homedirectory.mspx?mfr=true

Also, in any case I will need to reroute "My Documents" because of that ' ', which is not Linux-friendly.

  • You can change Ubuntu's default documents directory to My Documents by editing ~/.config/user-dirs.dir and changing XDG_DOCUMENTS_DIR="$HOME/Documents" to XDG_DOCUMENTS_DIR="$HOME/My Documents". Although space is troublesome in any system unless used within quote. – Samik Jul 4 '12 at 19:43
  • But not all applications, including GDB and MinGW, can handle it. So on the Windows side, i do not like this whitespace. – user877329 Jul 5 '12 at 6:53
  • Not recommended: Read blogs.msdn.microsoft.com/commandline/2016/11/17/… – K7AAY Jul 11 '18 at 17:26
  • @K7AAY Wile the solution has some caveats, it has worked for me since 2012 Win7 + buntu. But yes, file permissions may screw up sometimes. But I have not experienced any data corruption. – user877329 Jul 11 '18 at 17:42
1

Just started experimenting with sharing a series of directories on btrfs between windows and linux since that driver seems to work alright. I feel like you don't want to commingle your dotfiles, I can't think of any collisions, and maybe they would be good collisions?

(/home/user && C:\Users\user) ~/Documents       -->   /dev/sdXX/user/documents 
(/home/user && C:\Users\user) ~/Pictures        -->   /dev/sdXX/user/pictures
(/home/user && C:\Users\user) ~/Downloads       -->   /dev/sdXX/user/downloads     
(/home/user && C:\Users\user) ~/Development     -->   /dev/sdXX/user/development 
(/home/user && C:\Users\user) ~/VirtualMachines -->   /dev/sdXX/user/virtualmachines 

I never realized how ridiculous the windows permission system really is. Probably should have put more thought into that part before I went and did it. I thought, maybe they would just work the same? I'm not really sure what's going on with them now, a bunch of "weird stuff" is all I can report with confidence. ¯\_(ツ)_/¯

I mostly don't trust the disk anyway. If a file isn't backed up in 3 places, you might as well be prepared to lose it because you probably will.

Anyway. I think it was a REALLY bad idea. I get how it seemed super awesome because I had that experience when I thought of it as well. And this comment is really for the next person to think of it. If they're smart they'll search before they implement.

Maybe by then microsoft will have determined the best business decision they could possibly make would be to adopt the linux kernel for their next release. This component of file management will no longer be a concern, and we can all fight about which file system is better until it descends into personal insults. I don't know what it is about filesystems that gets people so emotional. It's a really weird phenomenon. I bet we'll hear about a cult of some specific, probably obscure, filesystem pretty soon.

  • You should definitly use ExFAT :-) – user877329 Jun 19 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.