dam034
November 2nd, 2018, 06:58 PM
Dear users,
I use a virtual host on a dedicated server.
In this virtual host folder I have a website.
I want to create a sub-folder where the users can upload what they want. This sub-folder will be a symbolic link to the real path name (in another partition).
Since the users can upload files to attack my server, I want to disable everything that can be dangerous, including PHP.
Now the configuration is this, taken from the virtual host file configuration in sites-available:
<Directory /srv/panomnia/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
In the panomnia folder, there is a sym link to another folder, which will contain the files uploaded by the users.
Now I want to disable PHP (and everything that can be dangerous) in /srv/panomnia/uploads/ folder, so that the users can only list the folder and visit/download the files.
How is it possible?
Thanks
I use a virtual host on a dedicated server.
In this virtual host folder I have a website.
I want to create a sub-folder where the users can upload what they want. This sub-folder will be a symbolic link to the real path name (in another partition).
Since the users can upload files to attack my server, I want to disable everything that can be dangerous, including PHP.
Now the configuration is this, taken from the virtual host file configuration in sites-available:
<Directory /srv/panomnia/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
In the panomnia folder, there is a sym link to another folder, which will contain the files uploaded by the users.
Now I want to disable PHP (and everything that can be dangerous) in /srv/panomnia/uploads/ folder, so that the users can only list the folder and visit/download the files.
How is it possible?
Thanks