LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2009, 02:13 AM   #1
own3mall
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Rep: Reputation: 0
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?
 
Old 08-08-2009, 02:20 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
That's a mysql error. Nothing to do with folders.
 
Old 08-08-2009, 02:24 AM   #3
own3mall
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
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?
 
Old 08-08-2009, 02:29 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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.
 
Old 08-08-2009, 08:36 AM   #5
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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
 
Old 08-09-2009, 06:52 PM   #6
own3mall
LQ Newbie
 
Registered: Aug 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlinkels View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql --- Access denied for user 'test'@'localhost' permalac Linux - Server 15 03-05-2013 08:51 PM
MYSQL: Access denied for user 'root'@'localhost' (using password: NO) jun_tuko Linux - Software 3 03-05-2013 06:37 AM
Access denied for user: 'mythtv@localhost' Red Knuckles Ubuntu 1 10-04-2007 03:12 PM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM
Sarge mysql-server Access denied for user: root@localhost infinity432 Linux - Software 2 05-18-2005 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration