0

I have been trying to run my server.command file forever. I have tried changing access privileges with chmod x+u pressing enter then dragging the file into Terminal and pressing enter, but when I do, it says:

-bash: /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command: Permission denied

1
  • 1
    Despite chmod x+u being incorrect as discussed in the answers provided, you also seem to be missing the fundamentals of what you're trying to accomplish, because you're pressing enter to run the command immediately after chmod x+u, but you should be pressing space instead, then inserting the file path, so that the chmod has a path to execute upon.
    – grg
    Aug 5, 2015 at 19:14

2 Answers 2

1

If you actually used chmod x+u filename then here is the results of a sample from Terminal:

$ echo 'echo Hello World!' > hello.command
$ ls -l hello.command
-rw-r--r--  1 user  staff  18 Aug  5 14:24 hello.command
$ chmod x+u hello.command
chmod: Invalid file mode: x+u
$ ./hello.command
-bash: ./hello.command: Permission denied
$ chmod +x hello.command
$ ls -l hello.command
-rwxr-xr-x  1 user  staff  18 Aug  5 14:24 hello.command
$ ./hello.command
Hello World!
$ 

It just needs to be: chmod +x filename

If you only want it executable for the User, then use: chmod u+x filename

8
  • still says: -bash: /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command: Permission denied Aug 5, 2015 at 18:32
  • 1
    @Kipperbang12, What is the output from Terminal of ls -l filename where filename is the name of the file (including path if necessary)? Aug 5, 2015 at 18:33
  • this everything i typed: Last login: Wed Aug 5 19:29:46 on ttys000 Alecs-Air:~ Alec$ chmod +x 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 ... Alecs-Air:~ Alec$ /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command -bash: /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command: Permission denied Aug 5, 2015 at 18:35
  • i don't know what you mean by '1s'? Aug 5, 2015 at 18:42
  • Copy and paste the following command into a Terminal and then press Enter and then copy and paste the output back here to a comment: ls -l /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command Aug 5, 2015 at 18:45
0

I think it's:

chmod u+x <filename>

rather than:

chmod x+u <filename>

So try:

chmod u+x /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command
2
  • Updated with command they could try...
    – noahd
    Aug 5, 2015 at 18:39
  • The u would be necessary if you only wanted the file to be executable for the owner.
    – fd0
    Aug 5, 2015 at 18:49

You must log in to answer this question.

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