0

Possible Duplicate:
How to 'chmod' on an NTFS ( or FAT32 ) partition?

I am a beginner on ubuntu 11.10, I want to execute some program named ./Pro but when i try:

$ ./Pro

I get the following error:

$Bash: ./Pro : Permission Denied.

When I try to change the permissions, by running: $sudo chmod +x Pro, nothing changes! In fact when I do $ls -l Pro the result is:

$-rw------- 1 hafez hafez 7251 2012-03-19 07:44 Pro

How can I run my file?

4
  • 1
    Add to your question that you are a ROOT user. For a beginner I find it odd that you would go directly to using ROOT. Apr 13, 2012 at 18:32
  • check the permissions of the directory you are in! (so cd .. and then ls -l|more)
    – Rinzwind
    Apr 13, 2012 at 18:39
  • 4 drwx------ 1 hafez hafez 4096 2012-03-19 07:44 tor-browser_en-US 30096 -rw------- 1 hafez hafez 30817839 2012-04-13 21:00 tor-browser-gnu-li nux-i686-2.2.35-9-dev-en-US.tar.gz
    – mefmef
    Apr 13, 2012 at 19:06
  • my drive is created on windows and its filesystem is ntfs is it related? because when i copy that Pro file to home it worked!
    – mefmef
    Apr 13, 2012 at 19:08

3 Answers 3

5

Check the output to the following command mount | grep -i nexec I think your filesystem is mounted with a noexec option.

From the man page:

noexec Do not allow direct execution of any binaries on the mounted filesystem. 

To solve this (until next reboot)

mount -o remount,exec your_filesystem

To make it survive a reboot, you'll have to edit /etc/fstab.

1

right click in the file -> permissions -> allow executing fila as a program =)

in command line: try with sudo!

sudo chmod +x Pro
3
  • sudo is not the problem
    – mefmef
    Apr 13, 2012 at 18:33
  • Did you try the graphical way? The first solution I told you. If it not work, make sure that nobody more (program or human) has the file in his possesion. Apr 13, 2012 at 20:06
  • To know if the file are opened or in posession by one program, execute in a terminal: lsof | grep "filename" without the quotes if something is in the output, then the file is possesed by this program. So you have to close this program/procces before changing the permissions. Are I explained well? =) Apr 13, 2012 at 20:12
0

Try:

chmod a+x Pro

Or, for fun:

chmod 755 Pro
1
  • nothing changed!
    – mefmef
    Apr 13, 2012 at 18:29

Not the answer you're looking for? Browse other questions tagged .