Tuesday 23 April 2013

[dcphp-dev] Question On "Permission denied"

Hey folks, 

I have a problem. I have a LAMP server running CentOS. In php I am attempting to opendir('/var/lib/mysql/');

But I am getting a "Permission denied" error.

drwxr-xr-x. 2 root root 4096 Apr 23 12:52 mysql

I can opendir('/var/'), and opendir('/var/lib/') but not opendir('/var/lib/mysql/');.

I can opendir on other directories in /var/lib, (like /var/lib/php). 

The permissions are set 755 for each level in this tree.

They are all owned by root:root, EXCEPT for /var/lib/mysql, which is owned by mysql:mysql.

I set the owner to root:root - but nothing. 

This is a test environment, so I set all the tree to 777 - nothing. 

I thought is could be the dot at the end of the permissions, which I read means the file has an access list with SELinux. But I cannot alter that. 

So, I'm a bit stumped. I don't have root user, but I do have sudo. 

Any suggestions?

Thanks in advance.

Robyn Wyrick
President, DC PHP, LLC
202-374-4747

"There is nothing in which people more betray their character than in what they laugh at." Goethe

0 comments:

Post a Comment