LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Still getting Apache 403 after adding Directory directive to Alias (https://www.linuxquestions.org/questions/linux-newbie-8/still-getting-apache-403-after-adding-directory-directive-to-alias-922743/)

Joshua Russo 01-08-2012 09:59 PM

Ya, I formatted and re-installed everything. I wanted a fresh start.

For the acl command, should I need to apply it from the home directory, or can I just do it on the static_test directory?

Joshua Russo 01-09-2012 09:41 AM

There must be some way to do this. All of the alias examples in the Apache docs use home: http://httpd.apache.org/docs/2.0/urlmapping.html

T3RM1NVT0R 01-09-2012 04:41 PM

@ Reply
 
In the link that you have posted I do not see any example in which author has used home. I will try to duplicate the way you want it to be but can't promise how soon I can, as it will depend on my schedule.

I have seen people setting up alias for directories but not for the one which is under their home directory. Because user is the owner of his home. I doubt it will work without configuring acl.

Let me see if there is some alternate way to get this done.

Joshua Russo 01-09-2012 05:39 PM

I was looking at the example
ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2

Joshua Russo 01-09-2012 07:51 PM

Ok, I found a solution, and thank you because it was via the setfacl command you suggested. I had tried it previously but I was using the wrong user.

sudo setfacl -R -m g:www-data:rx /home/josh/Dev

What I don't understand is why I had to apply it so far up the path. Do you know why it worked at the Dev level but not static_test, or some other directory deeper in the path?

T3RM1NVT0R 01-10-2012 12:38 PM

@ Reply
 
You're welcome.

Great that you got it working. Please mark the thread as solved.

To answer your query I need to know the acl for /home/josh. You can find that using the following command:

Code:

getfacl /home/josh
The reason I am asking for this information because it appears to me that earlier you have setup acl for the only at /home/josh level but did not perform it recursively. Then you setup acl at /home/josh/Dev/bell_network_stuff/git/dev/static_test which didn't work because the user was not able to get into /home/josh/Dev itself then how it can reach so deep in the path.

I will be able to say for sure if I know how acl is set on /home/josh

Joshua Russo 01-10-2012 06:08 PM

This is interesting. My initial attempt using setfacl was with root, that's why those entries are there.

# file: home/josh
# owner: josh
# group: josh
user::rwx
user:root:r-x
group::r-x
group:root:r-x
mask::r-x
other::r-x


# file: home/josh/Dev
# owner: josh
# group: josh
user::rwx
user:root:r-x
group::---
group:root:r-x
group:www-data:r-x
mask::r-x
other::---

What do the empty group and other entries with no permissions mean for home/josh/Dev?


All times are GMT -5. The time now is 02:26 PM.