403 Forbidden on every page in Apache (chmod help?)
It sounds like the permissions still aren't set right. Double check that the permissions were actually changed by the command. ls -la on the directory should show permissions.
All the permissions were updated correctly (owner user and group both shown as apache), but it still didn't allow apache to use the folder.
It worked when I chown'ed the parent directory (/home/vhostuser) to apache instead of just the web folder (/home/vhostuser/public_html). This is, however, obviously the wrong approach. The whole idea of a home directory is that it's owned by the user it's named for. In fact, after I chown'ed vhostuser's home directory to apache, vhostuser could no longer log in with SSH or even open a console window from KDE. I had to SSH in as root from another machine and chown it back to its rightful owner just to allow vhostuser to use the system at all.
So, is there any way other than chowning vhostuser's home directory over to apache to give apache rights to use the folder?
It worked when I chown'ed the parent directory (/home/vhostuser) to apache instead of just the web folder (/home/vhostuser/public_html). This is, however, obviously the wrong approach. The whole idea of a home directory is that it's owned by the user it's named for. In fact, after I chown'ed vhostuser's home directory to apache, vhostuser could no longer log in with SSH or even open a console window from KDE. I had to SSH in as root from another machine and chown it back to its rightful owner just to allow vhostuser to use the system at all.
So, is there any way other than chowning vhostuser's home directory over to apache to give apache rights to use the folder?
Try mod_userdir.
Edit: I also meant check the chmod not chown status of the files. The line should look something like
Edit: I also meant check the chmod not chown status of the files. The line should look something like
-rwxrwxrwx
if it's set to 777.
Quote: Original post by tstrimp
Try mod_userdir.
Edit: I also meant check the chmod not chown status of the files. The line should look something likeif it's set to 777.-rwxrwxrwx
All my code files have -rwxrwxrwx permissions set. And mod_userdir isn't what I'm going for--this user is its own domain name, I'm not trying to get at it with localhost/~vhostuser.
Solution:
chmod 777 /home/vhostuser
Apparently 777'ing the public_html directory wasn't enough. The parent directory (which is not web accessible) also needs to be readable by apache for some reason. Any ideas why?
chmod 777 /home/vhostuser
Apparently 777'ing the public_html directory wasn't enough. The parent directory (which is not web accessible) also needs to be readable by apache for some reason. Any ideas why?
Quote: Original post by BeanDog
Apparently 777'ing the public_html directory wasn't enough. The parent directory (which is not web accessible) also needs to be readable by apache for some reason. Any ideas why?
Yes, in order to access a subdirectory you must also have permission to execute the parent directory. That's just the way permissions work in linux/unix derivatives.
Heh, that would do it.
Linux file system functions like a tree. If you can't get past an upper node, all of the lower nodes are off-limits as well.
Linux file system functions like a tree. If you can't get past an upper node, all of the lower nodes are off-limits as well.
--- ---Current Project: http://source.dev-null-productions.com/tw/"Perhaps the most fundamental problem, however, is that INTJs really want people to make sense."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement