Getting permission denied when trying to run startup?

Posted by Aqueus on Mon 19 Feb 2007 04:24 AM — 10 posts, 38,261 views.

USA #0
I've been working on my MUD for a good two weeks while the whole thing was down. Once I finally reduced all the errors to nil I found that the MUD wouldn't boot, frustrated (since I've worked for two weeks with the MUD down) I loaded a backup version, this was the whole MUD folder, (DBSC, in this case) went to the shell, and did a 'make clean' 'make' and everything compiled cleanly.

Try to log in - nothing. Odd, the MUD usually starts when I compile and stuff. Go back into the shell and type a simple './startup &' to get the thing going, the shell spits in my eye:

$ -bash: ./startup: Permission denied

So, my question, since I've spent so much preamble is simple:

What's going on, and why can't I use startup?

Here's my breakdown of the situation:

- No errors, compiled cleanly.
- Not creating any new log files, dumping core files, or crash logs, so nothing is going on.
- The file has the same permission settings as my makefile.
- I want to cry. *sniffle*
USA #1
Try doing a search, this has been asked before.
USA #2
Alright, I've gone through a lot - specifically everything mentioned in three other threads, two of which you posted in.

Remaining problems:

- The startup script is still denying me permission.
- The MUD won't automatically reboot.

I've tried creating a new startup file, pasting it in the contents of the old startup file and deleting the old one - nothing.

Tried starting from scratch by deleting the startup file and copying over the stock version that comes with DBSC.

Anyone got any ideas?

(I already tried using chmod +x to add the executable tag as some basserby mentioned, that caused some serious hell for a bit... but no solutions.)
Australia Forum Administrator #3
Can you do ls -l of your startup file? This is what I get:


$ ls -l startup
-rwxr-----    1 nick     nick          988 Feb 13 20:48 startup


In other words, startup must have execute permission.

If I take out the execute permission, I get your error message:


$ chmod u-x startup
$ ls -l startup
-rw-r-----    1 nick     nick          988 Feb 13 20:48 startup
$ ./startup
-bash: ./startup: Permission denied


Quote:

I already tried using chmod +x to add the executable tag ... that caused some serious hell for a bit ...


I don't see why that would "cause hell". It should have execute permission anyway.
USA #4
It worked. I'm astounded. When I used chmod u+x, it fixed it. Without the u it was causing compile errors. Regardless, thanks. You solved a very large problem. Thaaaank you.

Random aside: So... how does one go about changing their forum password?
USA #5
Quote:
Without the u it was causing compile errors

That doesn't make any sense, at all. What were the errors?

Forum password on here, you mean?
USA #6
Yeah, the password on here, and without the 'u' in the chmod, it was causing an error when I tried to run it. Said something to the effect of 'startup: line 6: syntax error before set'

So... I dunno, I don't know much about compily-server stuff. I only really use the commands that people have shown me.
Australia Forum Administrator #7
To change your password, make sure you are logged in (top right corner), and then click on "Edit Profile" which appears on the line under "You are logged on as xxxxxx".

On your profile screen there is a link to "change your password".
Amended on Tue 20 Feb 2007 07:11 PM by Nick Gammon
USA #8
Oh, no wonder it didn't make sense. That isn't compiling. It's running a script.
#9
Nick Gammon said:

Can you do ls -l of your startup file? This is what I get:


$ ls -l startup
-rwxr-----    1 nick     nick          988 Feb 13 20:48 startup


In other words, startup must have execute permission.



im having the same problem when i type the ./startup comand
i think i understand the point, that startup must have an execute permission, now how do i assaign one exaclty?