Take the 2-minute tour ×
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.

On my system I have three partitions: one is shared between W7 and Linux Mint (NTFS), and the other two are OS-specific.

In my home directory I have created a symbolic link to another directory on the shared partition.

I have a simple .cpp file there which I compiled via g++ name.cpp. Usually, this would also make the file executable, but this time I had to manually chmod 755 it.

Strangely, this didn't work either, the console said it did not have the required permission. So I executed sudo chmod 755 a.out. This asked me for my password, and reported no errors. However, it had no effect. a.out was not executable. I've noticed some other strange behaviors in symlink directories too.

Whats going on and how can I fix it?

Edit:
My mount options:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda6 during installation
UUID=7c50dab1-730b-4d3c-a944-51da19c8e2c6 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda7 during installation
UUID=12e39b76-7f19-4c6d-a724-81ea29211db1 none            swap    sw              0       0
/dev/sda5 /media/yannbane/Shared ntfs defaults,fmask=117,dmask=007,gid=46 0 0
share|improve this question
    
Linux and NTFS often seem to not play well together, unfortunately. –  TAFKA 'goldilocks' Jan 20 '13 at 16:06
    
Could you please share the mount options? You either provide them as your mount command options or in your /etc/fstab. –  Leonid Jan 20 '13 at 16:32
    
@Leonid, here, see the edit. –  akled Jan 20 '13 at 19:06
1  
Thanks. Here goes the answer. –  Leonid Jan 20 '13 at 19:18
add comment

1 Answer

up vote 3 down vote accepted

As you can see, there is fmask option and it's set to 117. That effectively disables the exec permissions for anyone. If you don't want any restrictions, you may set it to 0 and remount. But please be aware: any restriction here was added to avoid problems and pitfalls.

share|improve this answer
    
I remember there being a problem with every file being executable... Will this happen? I'll try it later I'm in a middle of something now, thanks. –  akled Jan 20 '13 at 19:32
    
Yes, it will: all the files will be treated as executable. Basically, it does not want to distinguish between different types. –  Leonid Jan 20 '13 at 19:52
add comment

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.