I want to compile a source code in a NTFS partiotion but can not as shown in the following picture:
Although i can write files into that partition but Compile NOT!
How can i solve it?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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
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
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
This is very relevant https://askubuntu.com/a/208349/11212
someWeirdId /media/name ntfs auto,stuff,stuff,stuff,**uid=1000,gid=1000,umask=0000** 0 0