Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Currently I have a NTFS partition that contains shared data. My rationale is, NTFS doesn't have any idea about file permissions, so I won't have any trouble using them in a multi-boot system (currently I have Gentoo and Ubuntu, and the data partition is auto-mounted on both). Now I want to get rid of the NTFS thing, if possible. So the question is, how can I use something like ext4 and setup the same thing?

Update: Sorry I should have made it clear that I only have Linux distributions, so no problem with ext4. I just want to have a partition that contains world-readable files and is automounted at boot.

share|improve this question

3 Answers

up vote 7 down vote accepted

NTFS does have file permissions. Either you squashed them through mount options or you used consistent user mappings or you made your files world-accessible.

If you use a filesystem whose driver doesn't support user mappings, you have several options:

  • Arrange to give corresponding users the same user IDs on all operating systems.

  • Make files world-accessible through an access control list (this requires a filesystem that supports ACLs; ext[234] do, but you may have to add the acl mount option in your /etc/fstab). Run the following commands to make a directory tree world-accessible, and to make files created there in the future world-accessible:

    setfacl -m other:rwx -d -R .
    setfacl -m other:rwx -R .
    
  • Mount the filesystem normally and provide a view of the filesystem with different ownership or permissions. This is possible with bindfs, for example:

    mount /dev/sdz99 /media/sdz99
    bindfs -u phunehehe /media/sdz99 /media/shared
    

    Or as an fstab entry:

    /dev/sdz99  /media/sdz99  auto  defaults  0 2
    bindfs#/media/sdz99  /media/shared  fuse  owner=phunehehe
    

NTFS has the advantage that it's straightforwardly sharable with Windows, it is not a requirement for Windows sharing.

share|improve this answer
I'm sorry I haven't been able to get back to this question. I stopped using Windows already, so I want to switch completely to ext4 and I'm afraid that would mess up file permissions when I multiboot several Linux distributions. – phunehehe Jan 14 '11 at 8:35
@phunehehe: The three solutions I give work with ext4. – Gilles Jan 14 '11 at 19:30

Use bindfs. In short it adds more owners to the same folder. It gives you more flexibility and its simple. http://ubuntuforums.org/showthread.php?t=1460472

share|improve this answer

Your choice of filesystem depends on the operating systems that will need to read and write to the filesystem.

Since Windows doesn't natively support EXT4, and there is no 3rd party product to allow Windows to write to EXT4, I would use NTFS or FAT32 if Windows is one of the operating systems you need to share access to that data.

share|improve this answer
Sorry for the confusion, please see my update. – phunehehe Jan 14 '11 at 8:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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