4

I am trying to run the statistics software Stata 11 on Ubuntu 11.10. as a regular user and I get the following error message:

bash: xstata: Permission denied

The user priviledges seem ok to me, tough:

-rwxr-x--x 1 root root 16177752 2009-08-27 16:29 xstata*

I would very much appreciate some advice on how to resolve this issue!

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
ddd
  • 43

1 Answers1

10

In the ls output you can see the file owner(root) and group(root). The user priviiledges apply to file owner (rwx), file group (r-x) and others (--x). Because you are not the root (and I suppose that you are not in the root group), only other (--x) applies to you. Thus you can run the file, but not read it. As a quick fix, try chmod +r xstata, this gives the read permission to all.

Adam Trhon
  • 1,623
  • Thank you for your prompt reply. I followed your advice but now I get the following error message:
    "bash: .: xstata: cannot execute binary file"
    
    
    • Any idea what this could mean?
    – ddd Nov 04 '11 at 08:47
  • this means that bash doesn't know how to run the file. Take a look at this: http://ubuntuforums.org/showthread.php?t=964335 – Adam Trhon Nov 04 '11 at 08:55
  • 2
    @Dominik type file xstata to see what the file actually is. My guess is that if it is a binary program, it was compiled for different architecture (like 64 vs 32-bit or ARM arch. or simply a newer processor than yours). – rozcietrzewiacz Nov 04 '11 at 10:00
  • Thank you all. I figured out that I just executed the file with the wrong syntax. It works with ./xstata. Cheers! – ddd Nov 04 '11 at 10:02
  • 2
    @Dominik what you wrote suggests that you previously run just xstata and the output was "cannot execute binary file" - right? If so, than there probably is a broken copy of the file somewhere else in your PATH - you should clean up. See also this question about running programs on Linux. – rozcietrzewiacz Nov 04 '11 at 10:17
  • @Dominik As rozcietrzewiacz wrote, “cannot execute binary file” likely indicates that there's a binary for the wrong architecture in your $PATH (wrong architecture means a 64-bit program on a 32-bit system, or a 64-bit program on a 64-bit system that doesn't have 32-bit support installed). See this question. – Gilles 'SO- stop being evil' Nov 04 '11 at 21:01
  • The command which xstata should help you find it. – David Schwartz Nov 04 '11 at 21:50