Fedora Linux Support Community & Resources Center
  #1  
Old 6th May 2012, 02:01 PM
bernhard Offline
Registered User
 
Join Date: May 2012
Location: Wezep, The Netherlands
Age: 26
Posts: 21
linuxfirefox
Fedora 16 permissions /var/www folder

hi everyone. Iḿ trying to get my Apache server running. The server itself works now but I can add or edit files in the /var/www folder. I do not have the correct permissions. How can I accomplish this?

yours,
bernhard
Reply With Quote
  #2  
Old 6th May 2012, 02:30 PM
eaglelinux Offline
Registered User
 
Join Date: Jun 2011
Posts: 206
linuxchrome
Re: Fedora 16 permissions /var/www folder

hi,

use terminal and root premissions to add or edit files in the /var/www folder.

Bye !
Reply With Quote
  #3  
Old 6th May 2012, 02:44 PM
bernhard Offline
Registered User
 
Join Date: May 2012
Location: Wezep, The Netherlands
Age: 26
Posts: 21
linuxfirefox
Re: Fedora 16 permissions /var/www folder

Is there a way to give my account more general permissions? In Windows you have user accounts with very few permissions and administrator type accounts. Is this possible in Linux too? Ofcource I don want my account to have root permissions.
Reply With Quote
  #4  
Old 6th May 2012, 02:52 PM
eaglelinux Offline
Registered User
 
Join Date: Jun 2011
Posts: 206
linuxchrome
Re: Fedora 16 permissions /var/www folder

Yes of course, you can add your user to sudoers to have special premissions. And if you want to know how to do that, you can use this link: http://forums.fedoraforum.org/showthread.php?t=261679

I think that's helpful !

Bye !
Reply With Quote
  #5  
Old 6th May 2012, 03:08 PM
Fenrin Offline
Registered User
 
Join Date: Apr 2010
Location: Earth
Posts: 899
linuxopera
Re: Fedora 16 permissions /var/www folder

you could do the following:
  • add you user to the group apache in the file /etc/group (you can do it via editing this file or use the graphical tool "User and groups")
  • set the group owner of /var/www/html like this "chgrp apache -R /var/www/html
  • give this group write permission with "chmod g+rw -R /var/www/html" (execute permission would be x, if you need that too)
  • for some application, you will have to change SELinux settings

to see some interesting SELinux options you can use this commands:
Code:
getsebool -a | grep user
getsebool -a | grep http
you can enable such a option like this:
Code:
setsebool -P httpd_can_network_connect on
maybe intersting options: httpd_read_user_content, httpd_can_network_connect, httpd_can_network_connect_db, allow_user_mysql_connect or allow_user_postgresql_connect

instead of /var/www/html you can also use ~/public_html (~ is a abbreviated form of your user home directory).
to do this:
• setsebool -P httpd_enable_homedirs 1
• edit the file /etc/httpd/conf/httpd.conf: UserDir enabled, uncomment UserDir public_html

to allow applications (for example a php forum) write access to certain directories, for example in case of fluxbb:
• chcon -R -h -t httpd_sys_content_t /home/user/public_html
• chcon -R -h -t httpd_sys_script_rw_t /home/user/public_html/fluxbb/cache
• chcon -R -h -t httpd_sys_script_rw_t /home/user/public_html/fluxbb/img/avatars

Last edited by Fenrin; 1st July 2012 at 12:57 PM.
Reply With Quote
Reply

Tags
fedora, folder, or var or www, permissions

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
Fedora has changed permissions on a folder I copied hours ago! pampero Using Fedora 4 11th August 2010 08:47 PM
permissions on a folder. xptweakerntn Using Fedora 1 30th December 2006 07:33 PM
Folder Permissions byw Using Fedora 3 16th June 2005 03:27 PM


Current GMT-time: 10:46 (Friday, 31-10-2014)

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
Burgess Hill - Naraina - Warrington Travel Photos on Instagram