We are running a web server with CentOS, PHP, Apache, etc.
I have a common set of files and folders for our CMS that I like to keep in one shared location.
Each user has their own hosting account at /home/username/www and I have been creating a link to the shared files with:
ln -s /usr/local/share/cms/core ./core
The shared files and folders are all owned by root:root and are set to 755.
When I am logged in via SSH as a regular user I can access the shared files location and create the link to the shared files. However, when I browse to www.domainname.com/core
I get a 404. If I change the ownership of the link to root:root instead of username:username only then I can access www.domainname.com/core
PHP is set to execute as the user.
The problem is that users can't create the link and then change ownership to root. From time to time we're going to be giving 3rd parties access to specific user accounts, but I don't want to give out root access.
How can I configure this such that a link created by the user will be able to access the files in the shared location?
(Apologies if I've been vague or left out any important details. Ask away and I'll respond asap.)