LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Folder Permissions :: Access denied for user 'www-data'@'localhost' (https://www.linuxquestions.org/questions/linux-software-2/folder-permissions-access-denied-for-user-www-data%40localhost-745972/)

own3mall 08-08-2009 02:13 AM

Folder Permissions :: Access denied for user 'www-data'@'localhost'
 
So, I'm trying to give a folder within var/www/GamePanelX full permissions so that anyone can access the folder via http://IP.address/GamePanelX

I've tried:

Code:

eric@eric-desktop:~$ sudo -i
[sudo] password for eric:
root@eric-desktop:~# chmod a+rwx /var/www/GamePanelX
root@eric-desktop:~# chmod a+rwx /var/www/GamePanelX
root@eric-desktop:~# sudo nautilus
root@eric-desktop:~# chmod 777 /var/www/GamePanelX
root@eric-desktop:~#

So, that didn't work, as it returns the following message when I try to access it via localhost through Firefox:

Code:

Access denied for user 'www-data'@'localhost' (using password: NO)
I also tried editing the permissions using the gui by typing in sudo nautilus.

I write-clicked on the folder, went to the Permissions tab, and set the following:

Code:

Owner:                www-data
Folder Access:      Create and Delete Files
File Access:          Read and Write

Group:                www-data
Folder Access:      Create and Delete Files
File Access:          Read and Write

Others:
Folder Access:      Create and Delete Files
File Access:          Read and Write

Execute:  YES

I then clicked on Apply Permissions to Enclosed Files. Tried accessing it again at http://localhost/GamePanelX

Didn't work.

How is anyone supposed to access this folder?

acid_kewpie 08-08-2009 02:20 AM

That's a mysql error. Nothing to do with folders.

own3mall 08-08-2009 02:24 AM

Quote:

Originally Posted by acid_kewpie (Post 3635498)
That's a mysql error. Nothing to do with folders.

Oh, I didn't know. Thanks for the help. So what is causing this MySQL error?

acid_kewpie 08-08-2009 02:29 AM

Well, the authentication control within that. I'm not too hot at mysql, but in the main, access control is configured through the mysqladmin tool.

jlinkels 08-08-2009 08:36 AM

http://dev.mysql.com/doc/refman/5.0/...anagement.html

Look at chapter 5.5.1 and 5.5.2. Apparently your application uses the credential www-data to access MySQL so you should give this user read access to the database. You have to set up www-data as a user of the MySQL database.

If you remember exactly what the permissions were on the database files it is best to change them back to their original values.

jlinkels

own3mall 08-09-2009 06:52 PM

Quote:

Originally Posted by jlinkels (Post 3635760)
http://dev.mysql.com/doc/refman/5.0/...anagement.html

Look at chapter 5.5.1 and 5.5.2. Apparently your application uses the credential www-data to access MySQL so you should give this user read access to the database. You have to set up www-data as a user of the MySQL database.

If you remember exactly what the permissions were on the database files it is best to change them back to their original values.

jlinkels

Hey, I got it working. I'm such a newb! I got this error because I hadn't run the installer and created a database.


All times are GMT -5. The time now is 03:36 PM.