Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ntfs-3g and executables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 234
Location: Poland

PostPosted: Sat Dec 08, 2012 6:11 pm    Post subject: ntfs-3g and executables Reply with quote

Hello.

When I mount my NTFS partition with ntfs-3g using default settings, all my files are marked as executable, rwxrwxrwx. I changed the fmask and dmask as suggested here, but then all my executables are not executable by default, and I cannot change them to be executable anymore with chmod etc.

I use this partition as my main disk for software development, so I need some files there to be marked as executable (created by my compiler), but not all files (e.g. source code text files shouldn't be executable). Those are Linux executables, so this is unrelated to Wine. I use NTFS partition simply because it is a heritage from my old Windows installation, and it's a "shared partition" between Linux and Windows. (If it would be ext3 or something like that, it wouldn't be seen by Windows.) And I need to have access to those sources and other files (non-executable) from Windows and Linux, and the possibility to compile the Linux executables and run them from Linux.

How should I set those mount options up to achieve that?

I've found some documentation about ntfs-3g possibility to use Linux permissions and user mappings to control access to the files on NTFS partitions, but I don't understand what to do to setup it properly.

Is there anyone who had a similar problem and can show me a correct setup for that?
_________________
SasQ
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sat Dec 08, 2012 7:53 pm    Post subject: Reply with quote

Ordinarily, you can't do what you want to do with NTFS, since NTFS doesn't support Linux-style ownership or permissions. The site to which you link clearly identifies the mapping of Linux-style ownership and permissions to Windows ACLs as a proposal, not implemented code; but this more recent site provides download links, so you can try that. This looks like very "bleeding-edge" stuff, though, so you're unlikely to get any help for it in these forums. I recommend you try Tuxer's support forum, as noted at the bottom of that page. Personally, I'd be reluctant to use this code in a production environment, especially without feedback from other users about its reliability. Damaged filesystems are not fun.

I'm not familiar with every detail of your configuration or how you use your system, so I don't know what might work best aside from using NTFS in this bleeding-edge way, but three broad classes of options come to mind:


  • Convert the partition from NTFS to a Linux filesystem and install a driver for that filesystem in Windows. Chances are that ext3fs will work best for this purpose, since it's old enough and popular enough that Windows drivers exist, although I admit I haven't used any of them for years. A Google search turned up this one, although the page only mentions up to Vista and Windows 2008, so it seems to have not been updated in a while. Another one is here. I recommend researching the reliability of such drivers and/or isolating access to as small a partition as possible so as to minimize the risk of a buggy Windows driver trashing your data.
  • Split the partition, keeping part of it as an NTFS (or FAT) data-exchange partition and part of it as a Linux-only partition on which you can do your software development. If necessary, you could probably work out some sort of an automatic file-sync procedure to copy some directory trees between partitions when you start up and/or shut down.
  • Keep it as-is but with mount options that provide execute permissions on all the files, and just live with the fact that your binaries and source code are incorrectly marked as executable. This won't cause you any real problems. The main drawback is if you want to distribute your source code (or even binary builds) to others, since they'll wonder why you've got those weird permissions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum