While trying to install phpmyadmin, I accidentally installed it as a root user.
Beginning of the story, I was editing the httpd.conf file of Apache. To avoid permission issues while running some commands, i did sudo su -
on the terminal. Thereafter without exiting from root user, I installed phpmyadmin using the following commands
cd /Library/WebServer/Documents/
tar -xvf ~/Downloads/phpMyAdmin-3.5.2.2-english.tar.gz
mv phpMyAdmin-3.5.2.2-english/ phpmyadmin
cd phpmyadmin
mv config.sample.inc.php config.inc.php
But now when I try to install yii at /Library/WebServer/Documents/
, i get the following error
PHP Warning – yii\base\ErrorException
mkdir(): Permission denied
Is there any way I can remove the root user privilege from phpmyadmin without uninstalling?
Operating system: OS MAC Mavericks
chown with the -R flag (recursive) is probably what you want. (The following may not apply exactly to your circumstances so please consider it carefully before running).
Of course, replace {YourUsername} with your actual username. The commands below just change the owner of the files and not the group. If you need to change the group name also, the new name goes after the colon:
cd /Library/WebServer/Documents/
chown -R {YourUsername}: phpmyadmin
I got the solution to this problem, just simple... All works with rights on folders in Yii.
Applied the chmod command recursively across yii/ directory. The following is the command snippet for reference:
Editors-Mac:Documents cborkotoky$ chmod -R 777 yii
Editors-Mac:Documents cborkotoky$ pwd
/Library/WebServer/Documents
Editors-Mac:Documents cborkotoky$ ls -l
total 80
-rw-r--r-- 1 cborkotoky wheel 3726 Dec 11 2013 PoweredByMacOSX.gif
-rw-r--r-- 1 cborkotoky wheel 31958 Dec 11 2013 PoweredByMacOSXLarge.gif
drwxr-xr-x 5 cborkotoky wheel 170 Feb 28 23:18 firstProject
-rw-r--r-- 1 cborkotoky wheel 44 Jun 28 2014 index.html.en
drwxrwxrwx@ 112 cborkotoky wheel 3808 Feb 28 14:03 phpmyadmin
-rw-r--r-- 1 cborkotoky wheel 23 Feb 26 17:59 test.php
drwxrwxrwx 4 cborkotoky wheel 136 Mar 1 02:03 yii
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.