Ubuntu :: PHP Not Working - Warning: Unknown: Failed To Open Stream: Permission Denied
Mar 10, 2010
I just isntalled LAMP using tasksel and have a problem. Whenever I try to access a page (aside from phpmyadmin, that works well), I get this error... Code: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
I have restarted the computer, restarted apache, etc and still nothing. When I first installed, phpmyadmin was inaccessible, so I ran some command in terminal which apparently created a symlink between phpmyadmin in the user/share dir to the /var/www dir, and curious if this is the problem. I have no clue how to remove this symlink if this is the case, and have phpmyadmin working now due to install using sudo apt-get install phpmyadmin.
I tried posting this before and I'm not sure what happened but I don't think it worked, so if it did please forgive the double post.am very very new to centOS and linux in general. I just want to setup a test web server that more closely mirrors our actual web server that is hosted by rackspace. I've installed centOS and tried to setup Apache, PHP and MySQL from a guide on the web using Yum. When I go to localhost in the web browser I'm able to see the default apache page. However when I create a php page it's just blank.When I look at the apache error logs I get this: PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
I've been searching alot on the internet and I know the issue is permission related, but I don't know how to fix it. I've seen some forum posts that say you need to use the chmod 775 command on the /var/www/html folder.Currently when I do ls -l /var/www/html it returns
-rw------- 1 root root 19 May 5 13:16 index.php -rw------- 1 root root 19 May 5 13:15 index.php~
I'm sure that this isn't correct but like I said I don't know much about how to set permissions or who the owner needs to be. I've done alot of searching and seen similar posts, but no one seems to explain it clearly.
i just tried to install Ubuntu Netbook 10.04 on my old Amilo Lifebook P Series. But after the boot screen and the choice to install Ubuntu i get stuck at the Ubuntu screen with the little dots on the bottom If I hit esc i can see the warning (process 257): GLib-WARNING **: getpwuid_(r) failed due to unknown user id (0)
Currently running 10.04. Just did some updates and when it finished rebooting it just doesn't work right. Whenever I click on my user name to enter my password it freezes for 3-5 seconds then the screen reloads. If I do Ctrl+Alt+F7 I get this error(the title of the thread). I have no earthly idea what this means but everything was working great until I did my updates just a couple hours ago. on??
I have a Ubuntu box and just got a new hard drive. Rather than copy everything over from my old working Ubuntu install, I wanted to install Ubuntu from scratch and then rebuild the file contents.I have a large collection of music that I use on my mac (another computer) and like to keep sync'ed to the Ubuntu box. The following script used to work flawlessly:
"(process:325): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)"
It comes after choosing language, when the Ubuntu start-up logo shows with the 5 dut under it. I am trying to install Ubuntu Netbook on a little Compaq Mini.
When i try to install Ubuntu 11.04 or try without installing i get graphics like this:[URL] same with older versions, and on older versions i used to get this error: (process:257):GLib-Warning**:getpwuid_r():failed due to unknown user id(0) but on new version it dosent appear. My graphics card is: GeForce 7600GT MSI.
I cant install Ubuntu 11.04 , on my Emachines laptop. On my Windows 7, When I boot up my USB/CD/card, it says: Ubuntu failed to mount dev/loop0 , something like that everytime, no matter what I do. And when I try wubi it says permission denied, .log filed saved. I've also mounted it using clonedrive, nothing works.
I'm sooo exausted after two days of fooling with this. The problem: Apr 27 17:29:21 mxkasib dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=8(mail) egid=12(mail) missing +w perm: /var/run/dovecot/auth-userdb, euid is not dir owner)
Obviously, dovecot-lda, instanced by postfix, couldn't access the auth-userdb file because of permission. There are plenty of topics over the internet, the problem is really simple. Except for I've got all the permissions needed, or it seems to me so and I'm missing something. Here is some additional information:
[Code]...
I've given all the permissions I could imagine. It's even devil 666, and it still complains.
I have my DNS configure in 2 zones. 1 internal, and the other external. DNS is chrooted under /var/named/chroot amd has been operating without any problems for well over 2 years now. I have recently run cross the problem shown in the subject line. When I try to freeze the internal dehnert.com zone with the following command...rndc freeze dehnert.com IN internal
I get the error...
I have been running the command as root, and with iptables turned off, so there is no firewall to restricting access. (the system sits behind a firewall) I have been searching the forums all over, but I havent run across what might be causing me to have root denied access. If anyone has seen any problem like this, please point me in the right direction so I can iron this out.
I tried a 9.10 -> 10.04 upgrade that went fail. I can now get it to the login screen where it gives a hard freeze. Same with recovery. I can get to a command line, but not with networking so
So I finally said screw it, I'm going to doa fresh install. I downloaded and burned 10.04 at work. Not, it is giving me an installer error when I boot from it, but then it will load the desktop from the LiveCD.
All I really want to do is grab some data that I didn't get when I backed up by home directory, then I can go back and do a fresh install. I can even download a new 10.04 CD if I need to because the installation files are screwed up or something.
The problem is that some of the files have permissions on that that show as an 'X' on the icon and it won't let me copy them to my USB backup drive.
How can I copy the files marked with an 'X' that have this permission issue?
I'm trying to add a key public key for my dev box which is a vm running ubuntu natty, and I am unable to connect via ssh. I've tried rsa and dsa, as well as these commands:
Its been a while (maybe too long) since I last used yum to check for updates / install anything on my server, but when I tried the other day I got the following response:
# yum list updates Loading "installonlyn" plugin Setting up repositories Error: Cannot find a valid baseurl for repo: updates[code]......
Trying other mirror.Error: Cannot open/read repomd.xml file for repository: updates
A few weeks ago there were some network changes, but nothing else should have changed OS side.I have checked /etc/resolv.conf and that looks ok - ping and wget have no problem resolving hostnames.I tried setting enabled=0 in yhe .repos files - this allowed me to do a 'yum list', but 'yum list updates' returned an empty list - I am definitely not 100% up to date!
P.S. Attachment not there at the moment - getting the following error when I try to upload the zip file...Errors Returned While Uploading
Failed to open directory with write permission: /var/wwwthtml/oldwebcopy.centos.org/uploads/newbb
I had debian lenny running smoothly for a while, then I think the power went out and the computer didn't shutdown smoothly. The next time I started it up I ran into this error: Checking root file system.../etc/rcS.d/S10checkroot.sh: line 274: /sbin/logsave: Permission deniedfailed (code 126)This happens in single user mode as well. I've tried fscking all my partitions but it doesn't help. I've booted in bypassing the normal init and changed the permissions of /sbin/logsave to 777 and during boot I get a message of: The file system check corrected errors on the root partition but requested that the system be restarted. failed!Then the system just reboots automatically without letting me to anything.
I'm getting error from KVM when i try to create new machine. I have install group Virtualization. From gui virtual-manager (after being asked for root passwd) tried to create new machine. When pressed on 'Finish' got this 'Permission denied' error: Code: Unable to complete install '<class 'libvirt.libvirtError'> internal error Process exited while reading console log output: char device redirected to /dev/pts/3 qemu: could not open disk image /sonik_data/software_archive/CentOS-5.5-x86_64-netinstall.iso: Permission denied
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/create.py", line 1567, in do_install dom = guest.start_install(False, meter = meter) File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1023, in start_install return self._do_install(consolecb, meter, removeOld, wait) File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1088, in _do_install "install") File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1059, in _create_guest dom = self.conn.createLinux(start_xml, 0) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1277, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/3 qemu: could not open disk image /sonik_data/software_archive/CentOS-5.5-x86_64-netinstall.iso: Permission denied
It's running as a root, what permissions we are talking about here? I'm running F14, kernel 2.6.35.10-72.fc14.x86_64, libvirtd 0.8.3
I installed wvdial on my Satellite Toshiba laptop. All works well but I have to use the <wvdial> command as root. If I try to use it as a user i get an error message Cannot open /dev/ttyACM0: Permission denied So Im just wondering; is it ok to use wvdial as root?
I was able to get the a2ensite command to enable a virtual site because it says "Site xxxxx.com already enabled" when I run the command. My problem now is that even though a site is enabled it says this: Code: /etc/init.d/apache2 restart * Restarting web server apache2
[Tue Apr 20 01:28:57 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Tue Apr 20 01:28:57 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Tue Apr 20 01:28:57 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Tue Apr 20 01:28:57 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Should I do a chown or chmod to a file?
this error spams about 100 times, then the scanner does indeed work. So I'm not completely broken, but the error messages are of concern, and it slows down the process of scanning for the time it takes to do the messages.
Error in console:
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied. libusb requires write access to USB device nodes.
when I try to su, with the right password I know it is because I have reset it with a sudo, it says su: incorrect password. Looking at /var/log/messages I see su: Unable to open admin password file: Permission denied. This must mean that the file has incorrect permissions and or owner/group. I am wondering if anyone knew where the file was located and the correct permissions/owner/group.
Warning: require_once(System/Folders.php): failed to open stream: No such file or directory in /var/www/spear.php on line 3 Fatal error: require_once(): Failed opening required 'System/Folders.php' (include_path='.:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear') in /var/www/spear.php on line 3
how should i correctly set the path in /etc/php5/apache2/php.ini
Running newaliasespostalias: fatal: open database /etc/aliases.db: Permission deniedin my /etc I do not have a aliases.db only an aliases.I cp aliases aliases.db but when I try and install post fix again it gives me the same error and aliases.db goes away.