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.

When I try to compile it says

sh: 1: /media/user/Linux/test/bin/Debug/test: Permission denied

I did not have this problem with Ubuntu 12.10

I have just started to use Ubuntu so....

share|improve this question
1  
Is /media/user/Linux/ a NTFS (or FAT) partition? I can't explain exactly why this happen, but I've seen a lot of "Permission denied" errors when compiling source code in a NTFS filesystem. Try to move the code to an EXT partition. –  Eric Carvalho Jul 10 '13 at 13:24

2 Answers 2

Change the project directory to your Home folder like /home/test

share|improve this answer

I have solved by making the NTFS partition executable You find these steps if you search for How to get permission to compile a C program from a NTFS Hard Drive.

Follow these steps to make a NTFS partition executable:

  1. Open a terminal and type

    sudo blkid -c /dev/null
    

    This command allow you to identify your NTFS drive and your UUID number. Example :

    /dev/sdb1: LABEL="my_label" UUID="xxx" TYPE="ntfs"
    
  2. Open the /etc/fstab file from terminal typing

    sudo gedit /etc/fstab
    
  3. Don't edit the existing lines, but add new one at the end like this example:

    UUID=xxx /media/my_label ntfs-3g defaults,auto,uid=1000,gid=1000,umask=002 0 0
    

    NOTE: Replace the UUID number and the mounting point /media/my_label according to your situation!

  4. Save the file and close the text editor.

  5. Enter the next command in the terminal:

    sudo mount -a
    

    After I have done this it said that it can not be mounted, but after I have restarted Ubuntu it worked.

  6. And restart Ubuntu. Done

Now, every time you mount your NTFS partition, you will be able to run executable files.

share|improve this answer

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.