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
    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 '15 at 19:14
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

  • still says: -bash: /Users/Alec/Desktop/Tekkit_Server_v1.2.9g/start.command: Permission denied – Kipperbang12 Aug 5 '15 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)? – user3439894 Aug 5 '15 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 – Kipperbang12 Aug 5 '15 at 18:35
  • i don't know what you mean by '1s'? – Kipperbang12 Aug 5 '15 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 – user3439894 Aug 5 '15 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
  • Updated with command they could try... – noahd Aug 5 '15 at 18:39
  • The u would be necessary if you only wanted the file to be executable for the owner. – fd0 Aug 5 '15 at 18:49

You must log in to answer this question.

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