From b2bda9ef60f051248b59aa812fbc01430bd412c2 Mon Sep 17 00:00:00 2001 From: Alfred Egger Date: Tue, 25 Jun 2019 00:16:35 +0200 Subject: [PATCH] Remove sudo from shell command --- lib/Controller/PrinterController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/PrinterController.php b/lib/Controller/PrinterController.php index 865e32a..e390408 100644 --- a/lib/Controller/PrinterController.php +++ b/lib/Controller/PrinterController.php @@ -29,7 +29,7 @@ class PrinterController extends Controller { public function printfile($sourcefile, $orientation) { if($orientation === "landscape") { $filefullpath = \OC\Files\Filesystem::getLocalFile($sourcefile); - exec('sudo lpr "' . $filefullpath . '"'); + exec('lpr "' . $filefullpath . '"'); return new JSONResponse( array( 'response' => 'success', @@ -40,7 +40,7 @@ class PrinterController extends Controller { if($orientation === "portrait"){ $filefullpath = \OC\Files\Filesystem::getLocalFile($sourcefile); - exec('sudo lpr -o orientation-requested=4 "' . $filefullpath . '"'); + exec('lpr -o orientation-requested=4 "' . $filefullpath . '"'); return new JSONResponse( array( 'response' => 'success',