I have a website running on Apache under Linux in the directory /var/www.
This site has some files outside the web directory root in /var/www-store which are written to and read by the apache user www-data.
I need another user to have read and write access to a subdirectory of this filestore /var/www-store/sync but for security reasons I don't want them to be able to access (read or write) to any files outside of this directory or anywhere else on the filesystem.
Additionally the files written by this user need to be writeable by the apache user and visa versa.
Can someone help with the permissions I need to set on this user and these directories to provide the security detailed above.