permission denied when redirecting sudo sed output
9,337
The tutorial does not use sudo
and requires a root shell. You can get a root shell with sudo -i
.
In case you prefer sudo
, the redirection is handled by the shell and not by the sudo
command. So you can't create a file in /etc/apache2/sites-available
by directing the output as you did. According to the sudo
manual, you should use a subshell like:
$ cd /etc/apache2/sites-available
$ sudo sh -c "sed 's/www/www\/drupal/g' default > drupal"
Related videos on Youtube
Author by
Bodhidarma
I started learning php about two weeks ago. I suck at it.
Updated on September 18, 2022Comments
-
Bodhidarma over 1 year
Possible Duplicate:
Redirecting stdout to a file you don't have write permission onI'm trying to install drupal according to the instructions given in this tutorial: http://how-to.linuxcareer.com/how-to-install-drupal-7-on-ubuntu-linux and am stuck on a step:
$ cd /etc/apache2/sites-available $ sudo sed 's/www/www\/drupal/g' default > drupal bash: drupal: Permission denied
The permissions for
/var/www/drupal
are set to 777.