Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-12-2012, 05:01 PM
|
#1
|
LQ Newbie
Registered: Aug 2012
Distribution: CentOS Linux release 6.0 (Final)
Posts: 5
Rep:
|
Trouble executing a .sh file on centos 6.1 x64 on a remote linux server.
Hi everyone,
I hope you are having a great day. I seem to be having trouble executing the shell file using the command.
I get the following message
[root@admin craftbukkit]# -bash: ./craftbukkit.sh: Permission denied
Any help would be appreciated!
Thanks!
|
|
|
08-12-2012, 05:04 PM
|
#2
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,419
|
Show the ownerships+perms of the file.
Is it a bash file?
What EXACTLY was the cmd you used?
|
|
|
08-12-2012, 05:06 PM
|
#3
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
terminal>
Code:
find `pwd` . -name craftbukkit.sh -exec ls -al {} \;
and
Code:
find `pwd` . -name craftbukkit.sh -exec head -2 {} \;
output please.
|
|
|
08-12-2012, 05:07 PM
|
#4
|
LQ Newbie
Registered: Aug 2012
Distribution: CentOS Linux release 6.0 (Final)
Posts: 5
Original Poster
Rep:
|
Thanks for the prompt reply Chris the permissions are listed below
[root@admin craftbukkit]# ls -l
total 11444
-rw-r--r-- 1 root root 11697717 Aug 7 07:28 craftbukkit.jar
-rw-r--r-- 1 root root 63 Aug 12 20:53 craftbukkit.sh
The command I used to run the shell script was ./craftbukkit.sh
|
|
|
08-12-2012, 05:09 PM
|
#5
|
LQ Newbie
Registered: Aug 2012
Distribution: CentOS Linux release 6.0 (Final)
Posts: 5
Original Poster
Rep:
|
Habitual the output you requested is listed below.
[root@admin craftbukkit]# find `pwd` . -name craftbukkit.sh -exec ls -al {} \;
-rw-r--r-- 1 root root 63 Aug 12 20:53 /root/craftbukkit/craftbukkit.sh
-rw-r--r-- 1 root root 63 Aug 12 20:53 ./craftbukkit.sh
[root@admin craftbukkit]# find `pwd` . -name craftbukkit.sh -exec head -2 {} \;
#!/bin/sh
screen java -Xms1024M -Xmx1024M -jar craftbukkit.jar
#!/bin/sh
screen java -Xms1024M -Xmx1024M -jar craftbukkit.jar
|
|
|
08-12-2012, 05:32 PM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,419
|
Code:
-rw-r--r-- 1 root root 63 Aug 12 20:53 craftbukkit.sh
You have no execute perms set on that file, that's why it won't run.
Try
Code:
chmod u+x craftbukkit.sh
BTW, please use code tags https://www.linuxquestions.org/quest...do=bbcode#code
|
|
|
08-12-2012, 05:36 PM
|
#7
|
LQ Newbie
Registered: Aug 2012
Distribution: CentOS Linux release 6.0 (Final)
Posts: 5
Original Poster
Rep:
|
Thanks Chris but now I get this error
Code:
./craftbukkit.sh: line 2: screen: command not found
|
|
|
08-12-2012, 05:38 PM
|
#8
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,419
|
Means what it says;
1. screen is not installed
OR
2. screen is not in your user's $PATH
BTW, please add you distro+version to your profile, so we can help you better eg
|
|
|
08-12-2012, 05:44 PM
|
#9
|
LQ Newbie
Registered: Aug 2012
Distribution: CentOS Linux release 6.0 (Final)
Posts: 5
Original Poster
Rep:
|
Thanks Chris my version is CentOS Linux release 6.0 (Final)I installed screen and it seems to work perfectly now.
Thank you very much for your help.(and patience!)
Kind Regards,
Cian
|
|
|
All times are GMT -5. The time now is 06:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|