Christopher 0 Posted October 18, 2020 Share Posted October 18, 2020 Hi, following on with your tutorial, i was editing the " sudo nano /etc/apache2/envvars " file which had the following lines , export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data If you don’t know what the username is, you can use the whoami command to find it out pi@WP:~ $ whoami pi I then went back to " sudo nano /etc/apache2/envvars " and changed export APACHE_RUN_USER=www-data to APACHE_RUN_USER=pi export APACHE_RUN_GROUP=www-data to APACHE_RUN_GROUP=pi then an the following and the following results pi@WP:~ $ sudo chown -Rf $(pi):$(pi) /var/www/html bash: pi: command not found bash: pi: command not found pi@WP:~ $ Please assist at your earliest convenience, much appreciated. Thanks. Chris Quote Link to post Share on other sites
0 Shahriar Shovon 5 Posted October 19, 2020 Share Posted October 19, 2020 14 hours ago, Christopher said: Hi, following on with your tutorial, i was editing the " sudo nano /etc/apache2/envvars " file which had the following lines , export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data If you don’t know what the username is, you can use the whoami command to find it out pi@WP:~ $ whoami pi I then went back to " sudo nano /etc/apache2/envvars " and changed export APACHE_RUN_USER=www-data to APACHE_RUN_USER=pi export APACHE_RUN_GROUP=www-data to APACHE_RUN_GROUP=pi then an the following and the following results pi@WP:~ $ sudo chown -Rf $(pi):$(pi) /var/www/html bash: pi: command not found bash: pi: command not found pi@WP:~ $ Please assist at your earliest convenience, much appreciated. Thanks. Chris Hi Chris, The command should be, $ sudo chown -Rf pi:pi /var/www/html Here, chown expects an username and a group name. $(pi) is used to run the pi command and substitute the result in the command sudo chown -Rf $(pi):$(pi) /var/www/html. There is no command pi. Thats why you get this error. If you want to use command substitution here, the command will be, $ sudo chown -Rf $(whoami):$(whoami) /var/www/html Wishing you all the best. Shovon Quote Link to post Share on other sites
Question
Christopher 0
Hi, following on with your tutorial, i was editing the " sudo nano /etc/apache2/envvars " file which had the following lines ,
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
If you don’t know what the username is, you can use the whoami command to find it out
pi@WP:~ $ whoami
pi
I then went back to " sudo nano /etc/apache2/envvars " and changed
export APACHE_RUN_USER=www-data to APACHE_RUN_USER=pi
export APACHE_RUN_GROUP=www-data to APACHE_RUN_GROUP=pi
then an the following and the following results
pi@WP:~ $ sudo chown -Rf $(pi):$(pi) /var/www/html
bash: pi: command not found
bash: pi: command not found
pi@WP:~ $
Please assist at your earliest convenience, much appreciated.
Thanks. Chris
Link to post
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.