Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to compile a source code in a NTFS partiotion but can not as shown in the following picture:

can not be compiled in NTFS partitions

Although i can write files into that partition but Compile NOT!

How can i solve it?

share|improve this question
1  
Can you post the error message you got? –  Eric Carvalho Jul 17 '12 at 21:35
    
@EricCarvalho i add a pic, see it! –  Milad Sobhkhiz Jul 19 '12 at 12:16
    
I think you could run bash configure. –  Eric Carvalho Jul 19 '12 at 19:14
add comment

4 Answers

up vote 1 down vote accepted

You can not compile because your file does not has executable permission. And you can not set file permission which is in ntfs partition because you did not mount your partition with write permission(But you can copy, cut, paste file). Easy solution is use ntfs-config

sudo apt-get install ntfs-config
sudo ntfs-config

Enable write permission for Internal and External device

enter image description here

Or you can set your fstab manually(ntfs-config just set your fstab). Your fstab should look like this..

#Entry for /dev/sda5 :
UUID=7818C41F18C3DA70   /media/Local    ntfs-3g defaults,locale=en_US.UTF-8 0 0
#Entry for /dev/sda6 :
UUID=7ED0CAEED0CAABA9   /media/Office   ntfs-3g defaults,locale=en_US.UTF-8 0 0
share|improve this answer
    
He said he can write to the ntfs partition. –  Eric Carvalho Jul 19 '12 at 19:11
    
@EricCarvalho you missed, i also said he can copy, cut and paste but can not change file permission –  shantanu Jul 20 '12 at 8:08
add comment

It's not a good idea using a NTFS partition to compile source code because usually the compiling generates executable files, which need the execute file permission, not provided by NTFS.

share|improve this answer
2  
I just compiled a c program on my NTFS partition and ran the executable without any problem. I don't think it is correct to say NTFS does not provide execute file permission. Maybe the problem is in the mounting option. –  G. He Jul 18 '12 at 3:36
1  
NTFS does not support execution of linux executable files. You can't even mark the files as executable. –  Akshit Baunthiyal Jul 19 '12 at 12:31
add comment

One way is to use permissions options which will let you change permissions of your indiviual file thus making it possible to be executed. If you mount the ntfs partition with the permissions option, then chmod / chown will work

/dev/sda2   /mnt/excess ntfs-3g    permissions,locale=en_US.utf8    0   0

You can then

sudo chown your_user:your_user /mnt/excess
share|improve this answer
add comment

This is very relevant http://askubuntu.com/a/208349/11212 adding someWeirdId /media/name ntfs auto,stuff,stuff,stuff,**uid=1000,gid=1000,umask=0000** 0 0

share|improve this answer
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.