Thread: Ubuntu problem

  1. #1
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278

    Ubuntu problem

    When ever I try to run some executable from Windows drive, terminal says "Permission denied".
    I am using Ubuntu 10.10. Facing the same problem when I try to run some program from CodeBlocks or Codelite.

    Code:
    anirban@anirban-Studio-1555:~$ cd /media/WORKS
    anirban@anirban-Studio-1555:/media/WORKS$ gcc a.c
    anirban@anirban-Studio-1555:/media/WORKS$ ./a.out
    bash: ./a.out: Permission denied
    anirban@anirban-Studio-1555:/media/WORKS$

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    What are your execution permission on the directory ("ls -al")?

  3. #3
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    I got the following..

    Code:
    anirban@anirban-Studio-1555:~$ ls -al /media/
    total 236
    drwxr-xr-x  5 root    root      4096 2010-12-16 19:49 .
    drwxr-xr-x 24 root    root      4096 2010-12-03 10:41 ..
    drwx------  1 anirban anirban 131072 2010-12-15 11:13 MOVIES
    drwx------  1 anirban anirban  69632 2010-12-15 11:13 MUSIC
    drwx------  1 anirban anirban  32768 2010-12-16 19:49 WORKS

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I'm assuming that directory is mapped? If so have a look in your fstab, is that partition mounted with noexec?

    Also does the a.out file have execution privs?

  5. #5
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    I think the partition does not have exec permission.
    Any help on this please?

  6. #6
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    just move the file to your hard drive, chmod +x a.out, and run

  7. #7
    Registered User
    Join Date
    Dec 2010
    Posts
    1

    Wink Partition does not have exec permission

    Ubuntu 10.10 changed the default mount options for ntfs filesystems.

    Some people make that Paradas en el camino...: Ubuntu 10.10 - Maverick Meerkat

    I hope it can help you...

  8. #8
    Registered User
    Join Date
    Dec 2010
    Posts
    16
    I believe the permission denied is coming in by not being mounted to the /media drive. Try mounting it first

    Alternative; copy the file from Windows to Ubuntu; then do whatever you need with it!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  2. Problem With Code In Ubuntu ,please Help Me
    By krisvamc in forum C Programming
    Replies: 2
    Last Post: 04-12-2007, 11:55 PM
  3. Problem With Code In Ubuntu ,please Help Me
    By krisvamc in forum Linux Programming
    Replies: 0
    Last Post: 04-12-2007, 05:08 PM