0

An error occurred.

Starting /media/milo/DATA1/Milo/C++/build-test-Desktop-Debug/test...
Cannot execute '/media/milo/DATA1/Milo/C++/build-test-Desktop-Debug/test': 
Permission denied
/media/milo/DATA1/Milo/C++/build-test-Desktop-Debug/test exited with code -1

below is the mount information

/dev/sdc5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=milo)

Can any1 tell me what's wrong? Thanks

Milo Lu
  • 103
  • 5

1 Answers1

0

It says Permission denied, i.e. you do not have the permission to run this program.

You will need to set the executable bit with command chmod +x /media/milo/DATA1/Milo/C++/build-test-Desktop-Debug/test

There is the catch though. It looks like the program is on a USB stick. If that stick is formatted as vfat filesystem then you may not be able to set the execution bit. If this is the case copy the program to your home folder (or another folder on an ext2/3/4 partition), set the execution bit there and run it.

sмurf
  • 4,680
  • Thanks for the answer. Actually its not a usb. Its my hard drive, in NTFS format. Its painful to change to FAT32. I tried chmod, and the copy trick, but it didnt work. – Milo Lu Jun 21 '15 at 12:14
  • @MiloLu "Actually its not a usb" ?! Update your question. – A.B. Jun 21 '15 at 12:38
  • Don't change ntfs to fat32, you will have the same problem! If it still doesn't work please copy/paste here the commands you used to copy, chmod and execute here along with any ouptut from them. – sмurf Jun 22 '15 at 00:16