Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NTFS access settings - All files executable?![solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
hungrigerhaifisch
n00b
n00b


Joined: 19 Sep 2005
Posts: 69
Location: Germany

PostPosted: Sat Sep 20, 2008 7:00 pm    Post subject: NTFS access settings - All files executable?![solved] Reply with quote

I've been having problems accessing ntfs partitions for quite a long time now, until I found a way that works.
I can read/write and execute files on my ntfs partion, through the ntfs3g driver.
However, as a sideeffect, all files on the partion are marked as executable, which is not what I want.
This is my fstab line:
Code:
/dev/hdb1    /mnt/drive_d    ntfs-3g users,exec,locale=en_GB.utf8,umask=022,uid=1000,gid=1000

Obviously this is down to the umask=022.
So I ask, which umask is correct, when I want read/write support + executable files?
I've googled long and hard, and all I ever find are confusing posts and references to man umask, which I do not find helpful.

Anyone??
_________________
"...and also because he is one of those people who find reasons to blame Microsoft for almost all their problems in life."


Last edited by hungrigerhaifisch on Thu Nov 27, 2008 12:25 am; edited 3 times in total
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3753
Location: sleeping in the bathtub

PostPosted: Sun Sep 21, 2008 12:32 am    Post subject: Reply with quote

You need directories to be executable, so you can split the permissions applied to directories from those applied to files.

Replace "umask=022" with "fmask=133,dmask=022", that should give you what you're looking for.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
hungrigerhaifisch
n00b
n00b


Joined: 19 Sep 2005
Posts: 69
Location: Germany

PostPosted: Sun Sep 21, 2008 1:04 am    Post subject: Reply with quote

Ok, thanks. That works just great!! :D
_________________
"...and also because he is one of those people who find reasons to blame Microsoft for almost all their problems in life."
Back to top
View user's profile Send private message
hungrigerhaifisch
n00b
n00b


Joined: 19 Sep 2005
Posts: 69
Location: Germany

PostPosted: Tue Nov 25, 2008 8:29 pm    Post subject: Reply with quote

Oh dear oh dear. :cry:
As it is, I just noticed that the above does not do what I want.
Its true that with a fmask=133, no files on the mounted ntfs volume are marked as executable.
However, I cannot set any of them to be so...(chmod, via filemanager) which has now turned out to be a problem...

So, how can I get this working.
I want all files be marked as not-executable, but if I wish to make them exec, I want to be able to do so.
I am using the exec flag.

Any hope / ideas?
_________________
"...and also because he is one of those people who find reasons to blame Microsoft for almost all their problems in life."
Back to top
View user's profile Send private message
MageSlayer
Apprentice
Apprentice


Joined: 26 Jul 2007
Posts: 228
Location: Ukraine

PostPosted: Wed Nov 26, 2008 8:18 am    Post subject: Reply with quote

See http://forum.ntfs-3g.org/viewtopic.php?t=915&highlight= for details.

Unfortunately, a problem is not so simple :)
Back to top
View user's profile Send private message
hungrigerhaifisch
n00b
n00b


Joined: 19 Sep 2005
Posts: 69
Location: Germany

PostPosted: Wed Nov 26, 2008 11:21 am    Post subject: Reply with quote

Hi, thanks for the reply.
I actually stumbled across that page myself (http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html), and briefly skimmed through the 'ownership and permissions' part, and couldn't make heads nor tails out of it... :(

Did you manage to find an answer to your problem, or did you just give up?
I'll have to have a more thorough read through when I find the time before I have any chance of getting this working...

On a side note, I think this is a serious usability issue. The ntfs3g driver has made huge steps towards becoming the defacto standard ntfs implementation in the free operation system world, and an issue such as this, should not have a 'non-simple' answer.
I mean the ntfs filesystem is becoming more and more common-place everywhere. Its no longer something people who dualboot between windows and say linux need.
usbsticks, external hdds, things that 'normal' people use today arrive preformatted with ntfs.
On the other side more and more 'normals' are starting to use linux as their os, and with at least no distribution I know of, having a sane standard setup in regards to ntfs access, I fear that this may end up hitting a roadblock, at some point...
_________________
"...and also because he is one of those people who find reasons to blame Microsoft for almost all their problems in life."
Back to top
View user's profile Send private message
eduardhc
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jan 2007
Posts: 97

PostPosted: Wed Nov 26, 2008 2:13 pm    Post subject: Reply with quote

hungrigerhaifisch wrote:
Hi, thanks for the reply.
I actually stumbled across that page myself (http://pagesperso-orange.fr/b.andre/advanced-ntfs-3g.html), and briefly skimmed through the 'ownership and permissions' part, and couldn't make heads nor tails out of it... :(

Did you manage to find an answer to your problem, or did you just give up?
I'll have to have a more thorough read through when I find the time before I have any chance of getting this working...

On a side note, I think this is a serious usability issue. The ntfs3g driver has made huge steps towards becoming the defacto standard ntfs implementation in the free operation system world, and an issue such as this, should not have a 'non-simple' answer.
I mean the ntfs filesystem is becoming more and more common-place everywhere. Its no longer something people who dualboot between windows and say linux need.
usbsticks, external hdds, things that 'normal' people use today arrive preformatted with ntfs.
On the other side more and more 'normals' are starting to use linux as their os, and with at least no distribution I know of, having a sane standard setup in regards to ntfs access, I fear that this may end up hitting a roadblock, at some point...


NTFS does not have an equivalent for the "executable" permission flag, thus a "chmod +x" order on an NTFS3G probably does nothing, as it has no direct way to translate it to the underlying file system.

Thus you have the option to mount ALL files as executables or not, but not only some of them. If choose the former, then NTFS shows you all files as executable. If not, none of them are. But you must understand that this is simply an abstraction that NTFS3G does, it has no real reflect in NTFS.

The only real alternative would to i.e. display as 'executable' only those files ending with .COM, .EXE and .BAT, as this is what really marks a file as executable under Windows (or else look for a PE header in the file, but I think this would be rather excessive and dangerous for a FS driver).

Regards,
Eduard
Back to top
View user's profile Send private message
MageSlayer
Apprentice
Apprentice


Joined: 26 Jul 2007
Posts: 228
Location: Ukraine

PostPosted: Wed Nov 26, 2008 5:35 pm    Post subject: Reply with quote

Quote:
Did you manage to find an answer to your problem, or did you just give up?

Well, I had only data files on ntfs partition, so basically I gave up using umask=0111,dmask=000 as mount options in fstab.

Quote:
I'll have to have a more thorough read through when I find the time before I have any chance of getting this working...

Perhaps you, maybe you better ask ntfs3g devs. They are very nice people actually :)

Quote:
I want all files be marked as not-executable, but if I wish to make them exec, I want to be able to do so.
I am using the exec flag.


Not quite clear - are you trying to keep unix/linux programs on NTFS? 8O
Or you mean Wine emulation? AFAIU, for correct wine emulation file is not required to have exec flag.
Back to top
View user's profile Send private message
hungrigerhaifisch
n00b
n00b


Joined: 19 Sep 2005
Posts: 69
Location: Germany

PostPosted: Thu Nov 27, 2008 12:25 am    Post subject: Reply with quote

Actually for wine emulation to work, you do need the exec flag. If its not set, I think wine has problems loading dlls.
It does not require a file, like game.exe to be set executable.

Actually I've kind of figured out that I wasn't thinking correctly earlier.
Quote:
Are you trying to keep unix/linux programs on NTFS?

Well no not really, but I have some games that are released as both windows and linux binaries.
I keep them in the same folder, on a ntfs partition.
This is where I ran into the problem, because obviously no 'linux-binary' will execute without being executable.
Quote:
NTFS does not have an equivalent for the "executable" permission flag, thus a "chmod +x" order on an NTFS3G probably does nothing, as it has no direct way to translate it to the underlying file system.

After reading your post, and a little at the ntfs3g driver page I kind of remembered that :oops:
I'll just move the games executables to a ext3 or whatever partition and symlink the games data folders :roll:

Regarding my 'rant', I wasn't refering to this 'executable-issue(or non issue...)' but more to the general problem that ntfs-volumes tend to get mounted readonly, even with ntfs3g, just because of wrong permission settings somewhere in the given linux-distro's setup...
_________________
"...and also because he is one of those people who find reasons to blame Microsoft for almost all their problems in life."
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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