Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th January 2005, 06:04 AM
mexicoshanty Offline
Registered User
 
Join Date: Dec 2004
Posts: 25
apache fc3 questions: starting apache & file permissions

hi everyone,

ive been playing with apache and i have a few questions that i cant seem to find the answer to.

What is the correct method to start apache in fc3, if i follow the apache documentation it tells me to execute ´apachectl start´, but i get a command not found. I did a search and found apachectl is located in /usr/sbin/. When i execute it, it returns to the command line almost instantly as it should, but apache does not start. The only way ive found to start apache has been through system settings -> server settings -> services then starting httpd. Apache appears to be working properly, but i have concerns as this is not recommended in the documentation.

My document root /var/www/html is owned by root and has the file permissions 755, for ease of use id like to be able to modify files in /var/www and all subdirectories without root privileges, should i change the permissions? What do you recommend i do? I just dont want to open up a security hole.

I tried to setup another virtual host with the document root /home/user/www/html but when i access this host i get a 403 forbidden error message. Im stumped as what could be causing this. SELinux allows read access to the home directory and file permissions were set at 755

Thanks, best regards mexicoshanty

Last edited by mexicoshanty; 12th January 2005 at 06:06 AM. Reason: improving tile description
Reply With Quote
  #2  
Old 12th January 2005, 10:09 AM
brahms Offline
Registered User
 
Join Date: Aug 2004
Posts: 434
To start apache:
Code:
service httpd start
This is the command line version of what you've been doing. The FC installation of Apache is designed to be run this way.
These are the permissions you need to set for a folder to be accessible by apache.
Code:
drwxr-xr-x  root root system_u:object_r:home_root_t       /home
drwxr-x--x  user user user_u:object_r:user_home_dir_t     /home/user/
drwxr-x--x  user user user_u:object_r:httpd_sys_content_t /home/user/www
drwxr-xr-x  user user user_u:object_r:httpd_sys_content_t /home/user/www/html/
Use
Code:
ls -lZd
to see what they are now, and
Code:
chmod
chown
chcon
to set your permissions like this and it will work. Post back if you need more information.
__________________
:cool:

Last edited by brahms; 12th January 2005 at 10:12 AM.
Reply With Quote
  #3  
Old 16th June 2005, 07:56 AM
harper Offline
Registered User
 
Join Date: Jun 2005
Posts: 7
hi !
yes....this is exactely my pb (setting up apache in FC3 ), but i did not get everything
my document root is /var/www/html, in the httpd.conf i'm NOT setting up USER_DIR or virtual host, but i run apache as root , however i can't get apache the exact permission to write to compile dirercotory (i'm trying to use SMARTY templates),
can you please tell what should be exactely the code in:
chmod
chown
chcon
thank u very much forur help
Reply With Quote
Reply

Tags
apache, fc3, file, permissions, questions, starting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple question anyone can check, apache server /html/ file permissions dashdanw Servers & Networking 4 21st November 2006 02:07 PM
Apache docroot file permissions, owner & group lozd Servers & Networking 5 30th April 2006 10:38 AM
Apache Permissions? mellis95 Linux Chat 1 13th April 2005 02:12 AM
Apache dir and file permissions Groundhog1248 Servers & Networking 1 7th January 2005 12:32 AM
Apache file permissions tim273 Servers & Networking 12 16th November 2004 10:59 AM


Current GMT-time: 18:49 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat