LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 12-06-2018, 02:19 PM   #1
Avivliberman
LQ Newbie
 
Registered: Dec 2018
Posts: 3

Rep: Reputation: Disabled
Question Trying to run "service httpd restart" and it fail


I am trying to run phpMyAdmin from web.

and when I tried to restart the service that's what it show:
Code:
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf.d/phpMyAdmin.conf: Permission denied
                                                           [FAILED]
already tried sudo and let all permission to the file.
running Centos 6

help me

Last edited by Avivliberman; 12-06-2018 at 02:20 PM.
 
Old 12-06-2018, 02:27 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
What are the permissions of /etc/httpd/conf.d/phpMyAdmin.conf ?

Does the file even exist?
 
Old 12-06-2018, 02:31 PM   #3
Avivliberman
LQ Newbie
 
Registered: Dec 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
permissions:
-rw-r--r--. 1 root root 674 Mar 22 2017 php.conf
-rwxrwxrwx. 1 root root 1787 Dec 6 19:45 phpMyAdmin.conf
-rw-r--r--. 1 root root 392 Jun 19 15:45 README
-rw-r--r--. 1 root root 299 Feb 19 2018 welcome.conf

and yes
 
Old 12-06-2018, 02:47 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Hmm. You know, I hope, that the 777 permission is bad...the file only needs to be world readable:
Code:
-rw-r--r--. 1 root root     2018 Oct 24  2017 phpMyAdmin.conf
on my system.
But that's not the problem in any case.

Presumably, this is also true
Code:
drwxr-xr-x. 3 root root     4096 Dec  3 12:43 /etc/httpd/conf.d
drwxr-xr-x. 5 root root       86 Dec  3 12:35 /etc/httpd/
Have you edited the file? If so, how?
Linux intentionally throws "Permission denied" errors when there may be other problems, as if the file contains DOS line end characters.
 
Old 12-06-2018, 04:45 PM   #5
Avivliberman
LQ Newbie
 
Registered: Dec 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
I have created the file again, and it worked
 
Old 12-06-2018, 05:01 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Avivliberman View Post
I have created the file again, and it worked
That's great! Would you please share what exactly you did...it may help the next person with a similar problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] if [[ -n "$1" ]]; then FAIL FAIL FAIL rbees Programming 7 03-25-2015 02:39 PM
httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 iswarya Linux - Newbie 1 01-25-2012 01:28 PM
Can not restart httpd”File size limit exceeded(core dumped) $HTTPD -DSSL” sreejithedl Linux - Server 2 10-12-2009 11:24 AM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
cronjob to restart httpd if httpd is dead heropage Linux - Software 1 10-31-2007 01:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration