LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-18-2012, 01:08 AM   #1
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Rep: Reputation: Disabled
listen to 80 port in cent 5.6 final, kernel 2.6.18


listen to 80 port in cent 5.6 final, kernel 2.6.18
Hello,
I find post that make listen port in httpd.conf file like this
/etc/httpd/conf/httpd.conf Listen 80 & this
/etc/httpd/conf.d/ssl.conf Listen 443

I have cent 5.6 with kernel 2.6.18-238.12.1.e15 on an i686

but I faced with
-bash: /etc/httpd/conf/httpd.conf: permission denied

also with 443 I found

/etc/httpd/conf.d/ssl.conf: permission denied

can you help me..
 
Old 01-18-2012, 01:26 AM   #2
xylos
LQ Newbie
 
Registered: Oct 2011
Location: USA
Distribution: Backtrack 5, Ubuntu 11.10, Linux Mint 12, Cyanogen Mod 7, FreeBSD 9.0
Posts: 17

Rep: Reputation: Disabled
What are the permissions on /etc/httpd/conf.d/ssl.conf and /etc/httpd/conf/httpd.conf?

Looks like the account trying to start up the webserver doesn't have permission to access those files.
 
Old 01-18-2012, 01:41 AM   #3
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
How I can view this file "httpd.conf" permission I am not using GUI just I have root user and shell command prompt.
Sorry I am totally new in linux.

thanks
 
Old 01-18-2012, 01:44 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,521

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Quote:
but I faced with
-bash: /etc/httpd/conf/httpd.conf: permission denied

also with 443 I found

/etc/httpd/conf.d/ssl.conf: permission denied
You're not supposed to run these files. You need to use your preferred editor and edit them as root.

Regards
 
Old 01-18-2012, 01:46 AM   #5
kishore_ari
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Rep: Reputation: 5
from the shell prompt try these and see what are the permissions on the file as well group and user then try id command and compare the results.
1) ls -l /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/ssl.conf
2) id
 
Old 01-18-2012, 01:50 AM   #6
xylos
LQ Newbie
 
Registered: Oct 2011
Location: USA
Distribution: Backtrack 5, Ubuntu 11.10, Linux Mint 12, Cyanogen Mod 7, FreeBSD 9.0
Posts: 17

Rep: Reputation: Disabled
To view the permissions on a file, just use the following command:

$ ls -la {{{FILE}}}

For example, to view the permissions on /etc/httpd/conf.d/ssl.conf just type:

$ ls -la /etc/httpd/conf.d/ssl.conf

(note that the dollar sign indicates the command prompt for a non-superuser, and is not part of the command itself)

You'll see something like this:

-rw-r--r-- 1 root root 1234 2012-01-15 00:01 ssl.conf

The permissions are interpreted as follows:

Character 1 (ignore for now, but "d" means directory)
Characters 2-4 (permissions for owner, "r" = read, "w" = write, "x" = execute)
Characters 5-7 (permissions for group, same coding as for owner)
Characters 8-10 (permissions for everyone else, same coding as for owner)

Following that string of characters and a number will be two names (root and root in the example above). The first is the owner of the file, and the second is the group. Most likely what you are seeing is a user that is not the owner or in the group, and a file that doesn't have permissions enabled for everyone else (which is generally a very good decision).

Try running the command that generated your error again, but this time as root. If the errors go away, you've found the problem.
 
Old 01-18-2012, 02:18 AM   #7
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
I executed as follow:
ls -la /etc/httpd/conf/httpd.conf result:
-rw-r--r-- 1 root root 33727 jan 17 14:26 /etc/httpd/conf/httpd.conf

then I wrote:

id /etc/httpd/conf/httpd.conf result
/etc/httpd/conf/httpd.conf:No such user

another try like follow

ls -la /etc/httpd/conf.d/ssl.conf result
-rw-r--r-- 1 root root 9677 may 4 2011 ls -la /etc/httpd/conf.d/ssl.conf

then I wrote:
id /etc/httpd/conf.d/ssl.conf result
id /etc/httpd/conf.d/ssl.conf:No such user

Now what I have to do now, it seems to be no access for user root?

thanks
 
Old 01-18-2012, 02:57 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,521

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Once again. You should use your favorite editor to edit those files. E.g. as root, run:
Code:
nano /etc/httpd/conf/httpd.conf
 
Old 01-18-2012, 04:49 AM   #9
kishore_ari
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Rep: Reputation: 5
salytwo,

firstly, do you want to change anything(configure) inside those two files ? if yes, you can use nano or vi or any favourite edirors of yours.
Secondly, do you want to start apache ? if yes, you can start it by using /usr/sbin/apachectl start.

Please login as root or use sudo to do any of the above.
 
Old 01-18-2012, 05:09 AM   #10
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
kishore_ari and bathory,
I need to enable one of them or both I just want to go in GUI of Elastix.
regard apache2 is already running.
so How I can edit this conf file I mean which line I have to edit?
I know the vi editor very well.

thanks
 
Old 01-18-2012, 05:35 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,521

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Apache by default listens on port 80, so there is no need to edit httpd.conf for this. Also in ssl.conf 443 port is defined
But if you feel you have to edit these files, make a backup first and then run:
Code:
vi /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf.d/ssl.conf
Search of the Listen directive in both of them, if you want to do any changes

Regards
 
Old 01-18-2012, 07:02 AM   #12
kishore_ari
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Rep: Reputation: 5
salytwo, this doesn't seem to be a linux related problem but you could have googled around a bit to see how/where to edit the configuration files.

http://www.elastix.org/component/kun...e-folders.html
http://projects.colsolgrp.net/projec..._Elastix_users
http://blogs.elastix.org/en/2010/03/...gement-system/

I hope the above URL's might give you start point.
 
Old 01-18-2012, 07:05 AM   #13
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
which line I have to alter to obtain port 80 and 433 worked

thanks
 
Old 01-18-2012, 07:39 AM   #14
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
the line where it's written:
Code:
Listen *:80

or
Listen 80

or

Listen 12.34.56.78:80
If there is the last line with IP numbers, then it's probably your IP not this I wrote (I made up).
 
Old 01-18-2012, 08:52 AM   #15
salytwo
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kishore_ari View Post
salytwo, this doesn't seem to be a linux related problem but you could have googled around a bit to see how/where to edit the configuration files.

http://www.elastix.org/component/kun...e-folders.html
http://projects.colsolgrp.net/projec..._Elastix_users
http://blogs.elastix.org/en/2010/03/...gement-system/

I hope the above URL's might give you start point.
Thanks
I tried all links but still not worked but I have to keep try...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Listen to a port rediff08 Linux - Newbie 9 07-11-2011 04:51 PM
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 11:07 AM
MULTICAST address and port, socket listen only on port? jf.argentino Linux - Networking 2 03-09-2009 01:42 PM
Port 80 listen without WebServer? hacinn Linux - Security 5 06-30-2004 10:52 PM
Can vsftpd listen to another port? twelve Linux - Networking 9 05-05-2004 09:13 PM


All times are GMT -5. The time now is 10:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration