Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 as a linux newbie, 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!

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

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.

share|improve this answer
    
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 4 '11 at 8:47
    
this means that bash doesn't know how to run the file. Take a look at this: ubuntuforums.org/showthread.php?t=964335 –  Dadam Nov 4 '11 at 8: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 4 '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 4 '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 4 '11 at 10:17
show 2 more comments

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.