Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change user (www-data) to root

I do not know what happens...but in my laptop, all folders and files have user www-data instead of root.

in directory /desktop /music ....alll directories ..

how can I change user root?

I use command

chown -R www-data:root /
chown -R root:www-data /

any ideas?? I tried a lot but I am not able to change the user for files and directories.

even I tried lots of commands but I do not know how can I change user as root

like image 661
alex Avatar asked Jul 16 '18 15:07

alex


1 Answers

write in command prompt :

sudo gedit /etc/apache2/envvars

change :

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

to :

#export APACHE_RUN_USER=www-data
export APACHE_RUN_USER=root
#export APACHE_RUN_GROUP=www-data
export APACHE_RUN_GROUP=root

hope so it will work for you

like image 190
JYOTI SAPARIYA Avatar answered Sep 30 '22 21:09

JYOTI SAPARIYA