Making file in user's homedir accessible from web/webserver

Posted by evident on Ask Ubuntu See other posts from Ask Ubuntu or by evident
Published on 2011-02-18T22:55:04Z Indexed on 2011/02/18 23:33 UTC
Read the original article Hit count: 335

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?

© Ask Ubuntu or respective owner

Related posts about permissions

Related posts about apache