Making file in user's homedir accessible from web/webserver
- by evident
Hi everybody,
I have a txt-file one of my user's homedir which is regularly updated there by a script.
I now want to be able to access (read) this file from the web.
/home/user/folder/file.txt
So what I tried now is to log in as root, go into my webservers httpdocs folder
/var/www/path/to/domain/httpdocs
and there I tried to create a symbolic link with
ln -s /home/user/foler/file.txt /var/www/path/to/domain/httpdocs/file.txt
But this didn't work... I already tried changing the chmod of the symlink (which changes the ones from the original file of course) and also a chown to the user from webserver, but no matter what I tried I cannot open the file from the web or from a php-script (which is what I want to do)
Can anybody help me and tell me what I need to do? What rights do I need to give? Or is there another way of achieving this?