Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Juventino

macrumors member
Original poster
Jun 26, 2010
52
0
Tehran
Hi everyone
I was trying to open a file (a keygen to be more precise).it was non-executable so I used chmod +x command in terminal and everything went well to this point.after this when I tried to open the file i got the "Permission Denied" error.
I tried the sudo command but it couldn't do the job either.
I created another admin account and everything worked with no problem.
so what's wrong with the account I use now? How can I make it right?
Thanks in advance
 
Hi everyone
I was trying to open a file (a keygen to be more precise).it was non-executable so I used chmod +x command in terminal and everything went well to this point.after this when I tried to open the file i got the "Permission Denied" error.
I tried the sudo command but it couldn't do the job either.
I created another admin account and everything worked with no problem.
so what's wrong with the account I use now? How can I make it right?
Thanks in advance

Please do the following:

1) Open Terminal (in Utilities).

2) Type the following into Terminal, leaving a space after the final character. Do not press return yet.

Code:
ls -l

(That's lowercase-L before the s and after the hyphen.)

3) Drag the file you wish to open and drop it into the Terminal window. This will append the file's location to the command you entered, but will not actually move the file.

4) Now click on the Terminal window to make it active, and press return.

5) Copy and post the complete output.
 
So you're trying to pirate software with a keygen?

Figure it out on your own. No one here should help you steal software.
 
This is what I get :
Code:
-rw-r--r--  1 Amin  staff  30725 Jan 17 05:47 /Users/Amin/Desktop/keygen_osx
 
  • Angry
Reactions: ikir
So you're trying to pirate software with a keygen?

Figure it out on your own. No one here should help you steal software.

first of all i did figure it out and you can consider the software "stolen" !
second of all, what difference does it make what kinda file it is ? my problem's not just about the keygen.
 
This is what I get :
Code:
-rw-r--r--  1 Amin  staff  30725 Jan 17 05:47 /Users/Amin/Desktop/keygen_osx

The file is owned by Amin, who has permission to read and write. The file is not executable.

User Amin should be able to read/write to this file (assuming it's a text file) using TextEdit (for example).
 
I log in with the account Amin
tried the chmod u+x, still the same result :

Code:
Last login: Sat Feb 12 16:30:38 on console
Amins-MacBook:~ Amin$ chmod u+x/Users/Amin/Desktop/keygen_osx 
usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Amins-MacBook:~ Amin$ /Users/Amin/Desktop/keygen_osx 
-bash: /Users/Amin/Desktop/keygen_osx: Permission denied
 
This is kind of obvious, but did you repair permissions on the drive yet? Also with the last command you posted, you left out a space between u+x and the path, so that command isn't valid. If it worked on one account and not another you should also consider you might have mistyped.
 
I log in with the account Amin
tried the chmod u+x, still the same result :

Code:
Last login: Sat Feb 12 16:30:38 on console
Amins-MacBook:~ Amin$ chmod u+x/Users/Amin/Desktop/keygen_osx 
usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Amins-MacBook:~ Amin$ /Users/Amin/Desktop/keygen_osx 
-bash: /Users/Amin/Desktop/keygen_osx: Permission denied

In Terminal, enter

Code:
chmod 755 ~/Desktop/keygen_osx

to make the file executable.

Then enter

Code:
~/Desktop/keygen_osx

to execute it.
 
Also with the last command you posted, you left out a space between u+x and the path, so that command isn't valid. If it worked on one account and not another you should also consider you might have mistyped.

nah, it's not about mistyping.look at this :

test account :

Code:
Last login: Sun Feb 13 02:06:46 on console
Amins-MacBook:~ test$ chmod u+x/Users/test/Desktop/keygen_osx 
usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Amins-MacBook:~ test$ /Users/test/Desktop/keygen_osx 
             .
             :
             |
       ______|____
      _\          /
      \        ___\
- ---- \_      __\__--- -  [ e ]  m  b  r  a  c  e -- - --- ----- --------
       /           /
      /____________\
             |                                  ... try E once ...
             |
             :                               ... and your addicted!
             .

Arobas Guitar Pro 6 Keymaker
Enter your offline activation request code:

my current account :

Code:
Last login: Sat Feb 12 17:24:09 on ttys000
Amins-MacBook:~ Amin$ chmod u+x/Users/Amin/Desktop/keygen_osx 
usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Amins-MacBook:~ Amin$ /Users/Amin/Desktop/keygen_osx 
-bash: /Users/Amin/Desktop/keygen_osx: Permission denied

I typed the same thing in both.

---

The chmod 755 command worked! thank you LPZ for your time.
as I know chmod 755 means read and execute access for everyone and also write access for the owner of the file.
according to the last log I posted I already had read/write access.
I still don't know what the problem was!
 
Hi guys,

I've got this issue when I tried to run the keygen_osx file.

Last login: Thu Nov 10 12:12:39 on ttys000

Joes-MacBook-Pro:~ Joe$ /Users/Joe/Desktop/keygen_osx ; exit;

Segmentation fault: 11

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.


[Process completed]


So... How to solve it? Can anybody here suggest me a solution?

TQ in advanced
 
You're actually getting a different error, a segmentation fault. It's usually due to running bad code, such as the wrong binary type or a mismatched library file. How sure are you of this keygen_osx file?
 
Tanmays-MacBook-Air:~ tanmay$ ls -l /Applications/prtl01mac/Portal/hl2.sh

-rwxr-xr-x 1 tanmay admin 1950 Jan 1 2015 /Applications/prtl01mac/Portal/hl2.sh
I got the following output. I do have the access to view and eidt, and it has been made executable by chmod u+x also, gatekeeper has been disabled (MacOSX Sierra), but I still get the permission denied message.

Any help please ?
 
I log in with the account Amin
tried the chmod u+x, still the same result :

Code:
Last login: Sat Feb 12 16:30:38 on console
Amins-MacBook:~ Amin$ chmod u+x/Users/Amin/Desktop/keygen_osx
usage:    chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
    chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
Amins-MacBook:~ Amin$ /Users/Amin/Desktop/keygen_osx
-bash: /Users/Amin/Desktop/keygen_osx: Permission denied
Well, the reason it didn't work is because you bungled the syntax of the chmod command. There's supposed to be a space between the arguments and the file path.

chmod u+x /Users/Amin/Desktop/keygen_osx

Note the space between "u+x" and "/User".

That's why chmod came back with an error message about syntax usage.

Hopefully in the 6+ years since you posted this you've learned to be a bit more careful about UNIX command syntax.
 
Well, the reason it didn't work is because you bungled the syntax of the chmod command. There's supposed to be a space between the arguments and the file path.

chmod u+x /Users/Amin/Desktop/keygen_osx

Note the space between "u+x" and "/User".

That's why chmod came back with an error message about syntax usage.

Hopefully in the 6+ years since you posted this you've learned to be a bit more careful about UNIX command syntax.

This is the right line, works right perfect!
chmod u+x /Users/Amin/Desktop/keygen_osx
Many many thaks!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.