[Symfony의 파일 시스템] [1]을 사용할 때 sudo로 파일을 어떻게 만질 수 있습니까?sudo로 파일 터치하기
지금까지 내가 가진 :
$fs = new Filesystem();
$confFile = sprintf('/etc/apache2/sites-available/%s.conf', $input->getArgument('name'));
$fs->touch($confFile);
하지만이 코드는 오류와 함께 실패 : Permission denied
.
[1]: http://symfony.com/doc/current/components/filesystem/introduction.html