LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-04-2006, 11:19 AM   #1
teek
Member
 
Registered: Jun 2004
Location: The Netherlands; Dordrecht
Distribution: Arch (at the moment)
Posts: 110

Rep: Reputation: 16
Moved files => Apache: "You don't have permission to access / on this server."


I have a problem I have seen in other threads:
Similar threads
However all the supplied solutions don't work for me.

The problem:
I have three discs (hda,b,c) now I want to reinstall Gentoo but keep the server running as long as possible therefore I want to copy every thing on hdb1 (currently: /home) to hdc1, and mount that as home (so hdb is free to make a fresh install). I used "cp -pRv" for everything to preserve permissions. Now when I mount hdc1 on /home apache gives me:
"Forbidden

You don't have permission to access / on this server."

In fstab I have as options for hdc: "defaults,noatime" the same as I had with hdb.

Somehow the permissions do alter when "cp -pRv" I think. I use Gentoo so the SELinux settings (ls -Z) options don't apply.

Thanx for any help.

Last edited by teek; 10-04-2006 at 11:20 AM.
 
Old 12-31-2006, 04:03 AM   #2
shawway
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
You don't have permission to access / on this server.

I started out looking for a really technical answer to this. It turned out to be a simple one.
I use Ubuntu, but it will probably work for anyone.

The default user and group set up in Ubuntu for apache is:
User www-data
Group www-data

These are set at install but appear in /etc/apache2/apache2.conf
I tried renaming or changing these and apache died, but thats another story.

The default folder is configured in: /etc/apache2/sites-available/default

SO..............

You need to set the owner of the default folder and rights to the appropriate group, in my case:
/var/www

so you can use:

sudo chgrp -R www-data /var/www

sudo chown -R www-data /var/www

sudo chmod -R 774 /var/www

Good luck and I hope this helps
 
  


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
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 Suse/Novell 2 03-06-2006 09:54 AM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
"No permission to access" linux box (Samba) TheOneAndOnlySM Linux - Software 3 03-21-2004 04:57 PM
Apache gives "You don't have permission to access..." paulvl Linux - Security 2 11-23-2003 03:46 PM
Can't access mounted NFS directory: "permission denied" SparceMatrix Linux - General 6 03-08-2003 01:36 PM


All times are GMT -5. The time now is 07:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration