0

I have been trying to disable directory listing in OpenCPU so our users cannot see the resulting directories and files in the http://server/ocpu/tmp/ directory.

I have followed Apache's Directory Listing Configuration and deleted every mention of Indexes in the conf files in /etc/apache2/ and included Options -Indexes in the sites-enabled/opencpu.conf file (in the Location tags) without success.

I also looked at the rApache documention without finding any pertinent entry.

Does anyone know any documentation or configuration to achieve this?

Pierre Lapointe
  • 16,017
  • 2
  • 43
  • 56
Jaime Campos
  • 3
  • 1
  • 1

1 Answers1

0

The directory listing is done dynamically by R code so Apache configs won't help here.

If you run the OpenCPU cloud server under Ubuntu directory listing of /ocpu/tmp is disabled by default via the apparmor configurations. Try it:

https://cloud.opencpu.org/ocpu/tmp/

This only works if your platform supports AppArmor, so it doesn't work for CentOS or Docker. Therefore Ubuntu deployment is recommended for production.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
  • Hi, thank you for your answer. Sadly, our servers run OpenCPU inside Docker (with a Debian image) within a RedHat server. Is there any other way to enforce the listing? Maybe using Docker's Apparmor or modifying the R code before building? – Jaime Campos Jun 27 '17 at 06:37