1

/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied * Stopping web server apache2 * /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied

I changed permission of those files i see here, with chmod 755, but the error continues.
When i was doing pset7 i didn't get errors, now when beginning pset8 i can't stop apache nor start it again, apache directory is stuck in pset7/public.

1

If your website presents ("is stuck in") pset7 after you start apache for pset8, do a ctrl-F5 in the browser, that will reload the correct website.

(author's note: after rereading the question I realized the above may be the real problem, however since I already typed the below.....:)

There seems to be a bug in /etc/profile.d/ide50.sh that is causing this /etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied message. It is just noise. You'll have to ignore the noise until the bug is fixed. In the meantime, you need to pay attention to the lines that don't contain the error message (the signal).

Notice this line * Stopping web server apache2. It indicates that the web server is stopped. To verify that, run apache50 status. You will get a result like this (emphasis added).

~/workspace/pset7/ $ apache50 status
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
Apache is not running.
~/workspace/pset7/ $

Similarly, a start will give something like this:

~/workspace/pset7/ $ apache50 start public
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
Setting Apache's document root to /home/ubuntu/workspace/pset7/public ...
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
* Starting web server apache2
/usr/sbin/apache2ctl: 18: /etc/profile.d/ide50.sh: [[: not found
*
/etc/init.d/apache2: 18: /etc/profile.d/ide50.sh: [[: Permission denied
Apache started successfully!
Your site is now available at https://ide50-username.cs50.io

~/workspace/pset7/ $

All things being equal, you will now be able to access your web site. This is true for pset7 and pset8. The bug appears to be a result of the new help50 utility added recently.

1
  • That did it! Thanks :)
    – thomas
    Aug 29 '16 at 14:34
0

Use this command to kill the zombie Apache2 processes:

sudo killall -9 apache2

After that, apache50 stop and apache50 start should work again. Let me know if they don't!

EDIT: I also saw the "apache2: no process found" error, but I was able to fix it anyway:

~/workspace/pset8/ (master) $ apache50 start public/
 * Stopping web server apache2                                                                                                                                                          * 
Setting Apache's document root to /home/ubuntu/workspace/pset8/public ...
 * Starting web server apache2                                                                                                                                                          * 
Apache started successfully!
Your site is now available at https://ide50-matt-obert.cs50.io
~/workspace/pset8/ (master) $ apache50 stop
 * Stopping web server apache2                                                                                                                                                          * 
~/workspace/pset8/ (master) $ apache50 status
Apache is running with "/home/ubuntu/workspace/pset8/public" as its root!
~/workspace/pset8/ (master) $ killall -9 apache2
apache2(10827): Operation not permitted
apache2(10832): Operation not permitted
apache2(10833): Operation not permitted
apache2(10834): Operation not permitted
apache2(10835): Operation not permitted
apache2(10836): Operation not permitted
apache2: no process found
~/workspace/pset8/ (master) $ apache50 status                                                                                                                                
Apache is running with "/home/ubuntu/workspace/pset8/public" as its root!
~/workspace/pset8/ (master) $ sudo killall -9 apache2
~/workspace/pset8/ (master) $ apache50 status
Apache is not running.
~/workspace/pset8/ (master) $ apache50 start public
Setting Apache's document root to /home/ubuntu/workspace/pset8/public ...
 * Starting web server apache2                                                                                                                                                          * 
Apache started successfully!
Your site is now available at https://ide50-matt-obert.cs50.io
~/workspace/pset8/ (master) $ apache50 stop
 * Stopping web server apache2                                                                                                                                                          * 
~/workspace/pset8/ (master) $ apache50 status                                                                                                                                          
Apache is not running.

By the way, if this answers your question, be sure to accept my answer by clicking on the green check mark. Otherwise, this will become a Zombie Question and haunt the forum forever.

2
  • No deal :( apache2: no process found
    – thomas
    Aug 29 '16 at 14:28
  • What does apache50 status say now? (Look at my console log in the EDIT above to see what I saw when I was trying to fix it.) Aug 29 '16 at 14:33

You must log in to answer this question.

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