kgp43
asked on
Make user download a file placed outside public_html
Hi,
Is there a way to allow a user to download a file placed outside of the public_html folder?
ex. /home/username/filename.zi p
Is there a way to allow a user to download a file placed outside of the public_html folder?
ex. /home/username/filename.zi
ASKER
isnt ln -s /.... a ssh command?
how can I do that with php?
how can I do that with php?
ln -s source tagart
is a shell command, you need to do it in the shell prompt.
Don't use php for the job, php script run as user nobody, you need
to do system call to run it as supper user, it is a security risk!
is a shell command, you need to do it in the shell prompt.
Don't use php for the job, php script run as user nobody, you need
to do system call to run it as supper user, it is a security risk!
ASKER
need it for my visitors.
I had problems with my hotlink protection and that question found a solution on this problem.
https://www.experts-exchange.com/questions/21416514/Deny-access-to-files-files-except-if-the-user-is-coming-from-a-specific-page.html
What do you do with this question then?
I had problems with my hotlink protection and that question found a solution on this problem.
https://www.experts-exchange.com/questions/21416514/Deny-access-to-files-files-except-if-the-user-is-coming-from-a-specific-page.html
What do you do with this question then?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
/home/username/download
then do:
ln -s /home/username/download /home/username/public_html
and make sure that apache user has "rx" permission to /home/username/download
dir.