Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 7th November 2006, 04:43 PM
mkj4 Offline
Registered User
 
Join Date: Sep 2006
Posts: 34
How make /var/www/html/mkj/wiki/images) writable by the webserver?

chown apache /var/www/html/mkj/wiki/images

?


edit: wrong title

Last edited by mkj4; 7th November 2006 at 04:47 PM.
Reply With Quote
  #2  
Old 7th November 2006, 05:22 PM
pdb Offline
Registered User
 
Join Date: May 2004
Posts: 269
Do you have SELINUX enabled? It could be an issue with the directory's selinux context.
__________________
http://pdb.homelinux.net
Registered Linux User # 348314
Reply With Quote
  #3  
Old 7th November 2006, 08:55 PM
Zotter's Avatar
Zotter Offline
Registered User
 
Join Date: May 2004
Location: Central Wyoming
Posts: 637
chown root:apache /var/www/html/mkj/wiki/images

chmod g+w /var/www/html/mkj/wiki/images
__________________
If it ain't broken - you're not really trying....
Registered Linux user #227845
Reply With Quote
  #4  
Old 7th November 2006, 08:58 PM
pdb Offline
Registered User
 
Join Date: May 2004
Posts: 269
Quote:
Originally Posted by Zotter
chown root:apache /var/www/html/mkj/wiki/images

chmod g+w /var/www/html/mkj/wiki/images
Can you explain why this would be different from changing the owner to apache as mkj4 tried?
__________________
http://pdb.homelinux.net
Registered Linux User # 348314
Reply With Quote
  #5  
Old 8th November 2006, 12:06 AM
Zotter's Avatar
Zotter Offline
Registered User
 
Join Date: May 2004
Location: Central Wyoming
Posts: 637
It's just the way I do it, that's worked for me.

Having 3 Wikimedia installs running - figured it'd workf or you too.

Oh, yea - gotta have at least g+x on the dirctory as well or apache can't change into that directory to write anything. Ooops
__________________
If it ain't broken - you're not really trying....
Registered Linux user #227845
Reply With Quote
  #6  
Old 8th November 2006, 12:34 AM
pdb Offline
Registered User
 
Join Date: May 2004
Posts: 269
It seems to me like it should work just as well to set the owner to apache and have the owner with rwx permissions as it would work to set the group to apache and give the group rwx permissions.... On my system they are equivalent as far as getting write access for the web server.

I would first double check that the directory has rwx permissions for the owner and that apache was correctly set as the owner. (ls -l /var/www/html/wiki) If that looks right, then I would suspect selinux if it is enabled.
__________________
http://pdb.homelinux.net
Registered Linux User # 348314
Reply With Quote
  #7  
Old 24th May 2012, 08:32 PM
hesam Offline
Registered User
 
Join Date: May 2012
Location: Malaysia
Age: 27
Posts: 5
linuxchrome
Re: How make /var/www/html/mkj/wiki/images) writable by the webserver?

This is always a security risk.
Ideally, you should create a group for all "web" users, e.g. users that need write access to /var/www. This would include you, root and apache.

sudo addgroup www-users

Then, you would add yourself and apache to this group.

sudo adduser <your-username> www-users
sudo adduser apache www-users

Finally, let's modify /var/www so that the new group can fully access it:

sudo chgrp www-users /var/www
sudo chmod –R 775 /var/www
sudo chmod g+s /var/www
__________________
--------------------
Hesam Esfahlani
http://about.me/hesames
Reply With Quote
Reply

Tags
make, webserver, writable

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
index.html for webserver help blueboy4 Servers & Networking 3 24th May 2008 09:53 AM
How to make FC6 DVD from CD images phongthai Using Fedora 3 1st November 2006 08:19 AM
How do I make it writable? pinenut Security and Privacy 1 27th November 2005 12:38 AM
How do I make yum.conf from read only to a writable file? Ebin Using Fedora 5 23rd March 2005 11:19 AM


Current GMT-time: 04:50 (Monday, 20-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