Getting 403: Forbidden on Alias'ed folders / Ubuntu 8.10

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Getting 403: Forbidden on Alias'ed folders / Ubuntu 8.10

Postby kamalx » 30. December 2008 02:18

Hi,
I installed the full package of XAMPP for Linux on Ubuntu 8.10 at the instructed location "/opt/".. It works fine with the default installation. But I wanted to change the "DocumentRoot" in httpd.conf to some other location from default /opt/lampp/htdocs. I used to do that every time I installed XAMPPlite on Linux (and Windows) and never got any trouble with it before this instance.. I keep the ServerRoot to default [on changing ServerRoot to something else gives me errors like "module.so not found" and all.. so I keep it unchanged ].

On changing the DocumentRoot to "/projects/www" where ("/projects" is a different partition), it gives me the error 403 on many of the folders within "/project/www" and other Alias'ed folders.. however, I also had an XAMPP install on the Windows FAT32 partition on the same machine and I just changed the paths in respective Alias'es copied from that setup to the mounted fat32 drive's path and its working fine!! So I am really foxed why the other one's are not working with Alias.

Following are the things i have already checked in this regard:
1. The index files exist ( index.htm or index.php ) in all these Alias-es that give 403 error.
2. Permissions on the Alias'ed folders that give me the 403 error: i even did a chmod 777 on those folders, still no go :(
3. Earlier httpd was running with user nobody and group nogroup, I have changed that to user "webd" of group "webd", still getting the same error.
4. The <Directory > thing looks like this for all those Alias-es:
Alias /repos "/projects/www/fwebs/repos"
<Directory "/projects/www/fwebs/repos">
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php index.php4 index.php3 index.html index.htm index.shtml index.phtml
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Options, DirectoryIndex, AllowOverride, Order, Allow have the same values for all my aliases but some of them are working (from the mounted win32 partition) while others from the local system are not accessible (error 403, Forbidden).

I really don't get what's wrong here. Would be greatly appreciated if you clear some fog. :)
Thanks in advance, :)
Kamal Morjal

Update: using XAMPP 1.7 (xampp-linux-1.7.tar.gz)
kamalx
 
Posts: 4
Joined: 30. December 2008 01:36

Re: Getting 403: Forbidden on Alias'ed folders / Ubuntu 8.10

Postby kamalx » 30. December 2008 03:46

kamalx wrote:Hi,
...snip...

3. Earlier httpd was running with user nobody and group nogroup, I have changed that to user "webd" of group "webd", still getting the same error.

Update: using XAMPP 1.7 (xampp-linux-1.7.tar.gz)


Another update:
I was pretty sure this is a permissions issue and that's what it was. :)
First I made the user "webd" a member of the group "joe"; joe's the account i am currently logged in.. But that didn't work either.
As a last resort I decided to run Apache with my account's privileges, user: joe, group: joe and it worked as expected.

Changes made to httpd.conf (that ships with the original package) were as follow:
-User nobody
-Group nogroup
+User joe
+Group joe

- indicates lines removed, + indicates lines added.

Although, I would really appreciate a solution that lets me run httpd as the user "webd" of groups "webd" and "joe", without changing the file permissions that are owned by user "joe" who belongs to groups "webd", "joe" and "root" besides other groups like sambashare, plugdev and such..
The permissions are essentially 655 or less restrictive on all those files and folders that i require to read through the server :)

Thanks.
Kamal
kamalx
 
Posts: 4
Joined: 30. December 2008 01:36

Re: Getting 403: Forbidden on Alias'ed folders [SOLVED]

Postby kamalx » 30. December 2008 04:03

Hello,

on further tampering, i did figure out a way to keep httpd running as "webd" and not "joe",
I have just made webd and joe both the members of the group 'joe' and i had to change the
ownerships of the files/folders in the site such that they belonged to user:group pair like
this -> "whateverUser:joe".. but i guess that'd be a pain to maintain with other users (not
belonging to the group joe) updating the files :P
Any ideas? However the major problem i had is solved. :)
Kamal
kamalx
 
Posts: 4
Joined: 30. December 2008 01:36

Re: Getting 403: Forbidden on Alias'ed folders / Ubuntu 8.10

Postby Nobbie » 30. December 2008 11:33

>but i guess that'd be a pain to maintain with other users (not
belonging to the group joe) updating the files

Its not a pain (or vice verse, yes, its a pain and must be a pain), because this the way how rights management of users, groups and files are working on linux. Its a powerfull management and its on you (the administrator) to grant permissions and rights to the users and groups as needed.

If you want to have ALL users of your linux system to have full access to the web development, you should create a group "www" for example, run Apache as group "www" and add all known users to group "www" (for example).
Nobbie
 
Posts: 8779
Joined: 09. March 2008 13:04

Re: Getting 403: Forbidden on Alias'ed folders / Ubuntu 8.10

Postby kamalx » 30. December 2008 22:25

Nobbie wrote:>but i guess that'd be a pain to maintain with other users (not
belonging to the group joe) updating the files

Its not a pain (or vice verse, yes, its a pain and must be a pain), because this the way how rights management of users, groups and files are working on linux. Its a powerfull management and its on you (the administrator) to grant permissions and rights to the users and groups as needed.

so true, "it must be a pain.." :)
i did eventually realize that this is one of the reasons i am in love with Linux :P
Nobbie wrote:If you want to have ALL users of your linux system to have full access to the web development, you should create a group "www" for example, run Apache as group "www" and add all known users to group "www" (for example).

Hmm.. that makes so much sense. Many thanks for sharing :)
kamalx
 
Posts: 4
Joined: 30. December 2008 01:36


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests