Terminal Help?

Joined
Jul 3, 2011
Messages
2
Reaction score
0
Points
1
The file “Start.command” could not be executed because you do not have appropriate access privileges. That is what I get when I try to start a command I have. If the text the command is made up of is of any help, here it is.

#!/bin/bash
cd "`dirname "$0"`"
java -Xmx1G -Xms1G -jar minecraft_server.jar

Basically its starting up a .jar file with extra ram, and this command worked for me for the past 2 months, and without notice it gave me that warning saying I could not start it. Any help on how to have these appropriate access privileges? I am the admin on my macbook, if that makes a difference. Thanks in advance, Dave.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I'm not sure if this is a typo that script is incorrect. It should be:
Code:
#!/bin/bash

cd "`dirname "$0"`"
java -Xmx1G -Xms1G -jar minecraft_server.jar

Change the permissions on the file like so:
Code:
chmod 644 <name of script>
That will give you r/w and everyone else read privileges. Next, make it executable:
Code:
chmod +x <name of script>
 
OP
D
Joined
Jul 3, 2011
Messages
2
Reaction score
0
Points
1
I'm not sure if this is a typo that script is incorrect. It should be:
Code:
#!/bin/bash

cd "`dirname "$0"`"
java -Xmx1G -Xms1G -jar minecraft_server.jar

Change the permissions on the file like so:
Code:
chmod 644 <name of script>
That will give you r/w and everyone else read privileges. Next, make it executable:
Code:
chmod +x <name of script>

Actually, nevermind, I just figured it out and it worked. Thanks a bunch!
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Let's do this a different way then. Right click the script > Get Info > Sharing and Permissions. What does it have listed there for your script?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
What command are you trying to execute? Is the script executable (see above post)?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
[/code]Change the permissions on the file like so:
Code:
chmod 644 <name of script>
That will give you r/w and everyone else read privileges. Next, make it executable:
Code:
chmod +x <name of script>


You can also just do chmod 744 <name of script>

Which will give you r/w/x for the owner and r only for the group / world, all in one step.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Good point! That'll save you one step (I'm used to doing it the other way - it was the first way I learned and I tend to be a creature of habit).
 
Joined
Jan 25, 2010
Messages
130
Reaction score
0
Points
16
Location
Russia, Moscow
Your Mac's Specs
MBA 13", 2.0 i7, 8GB, Intel HD 4000 512MB, 250GB, 10.8.3
I want to leanr how to use commands and the terminal as well (scripts)....as you can tell im a noob in this field...where can I learn such stuff???
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
A good UNIX book.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
I want to leanr how to use commands and the terminal as well (scripts)....as you can tell im a noob in this field...where can I learn such stuff???

As rman stated, a Unix book is a handy thing to have around and makes for good reading. In the meantime before you buy a book, check out this website which has a directory of all available commands and their meanings. LINK
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top