[R] Disabling shell access through system() possible?

Petr Savicky savicky at cs.cas.cz
Mon Feb 20 20:44:25 CET 2012


On Mon, Feb 20, 2012 at 06:17:23PM +0100, lists at mwoywod.de wrote:
> Hi! I'm deploying R behind a web-app on a linux-server and I don't want 
> to grant the users shell access through the system() function for 
> security reasons.
> 
> Is there any safe way to deny a user access to the function?

Hi.

Disabling system() is not sufficient. The user may call directly

  .Internal(system(, ))

Other dangerous things may be opening connections with write access
or manipulation with files. In particular, pipe() can also run
a command.

It could be better to run R under a user name with restricted
permissions.

Petr Savicky.



More information about the R-help mailing list