I am having trouble conecting to a mysql server that is runing on ubuntu 14.04. i can log into phpmyadmin and upload webpages via ftp but when i go to create a record set and define a database i get a 403 access forbiden. does any one have any ideas.
A 403 error doesn't mean your script is having trouble connecting to the database server, it means your client (the web browser) is not permitted to access the file/web page you're trying to access.
Most likely your permissions aren't set properly on the files you've uploaded by FTP. Check the owner and permissions and verify that they're appropriate for your situation (for instance, on my system files are 644 and directories are 755 and the file owner doesn't matter. Your mileage may vary).
Related
To give a little background information:
I have a Windows directory (Host OS) that I am sharing to CentOS (Guest OS) that serves as my local web server. For some odd reason, I cannot access any of the files in that share from a web browser. For example, if my address is http://192.168.1.200/home.html it gives me a "Forbidden: You don't have permission to view this page" error. When accessing the shared directory from Linux and try to perform a chmod -R 777 on the parent folder, I receive an access denied even running as root. The Windows side of the house has "Authenticated Users" and "Everyone" with full control. And this is with the assumption that the /etc/httpd/conf/httpd.conf is modified correctly.
Outside of this, if I just SCP the contents to the server and modify the httpd.conf file to reflect the new directory, I am able to access everything. The point of this is to be able to modify the local file on the Host OS and not having to SCP it over. Essentially, everything is updated on the server automatically when I save it on the Host OS side.
For my web database I am trying to create a webserver so I need to make a conf file. When I try to edit my conf file and save it wont let me and says permission denied. I have already given myself read and write access, but I still don't have access to the edit the file. Here is the link to the resource I am using to set up my webserver : https://github.com/orsenthil/adminer-on-mac
I've been working with local web servers and mysql on Mac for over 15 years, so this recommendation is coming from that experience.
OS X updates will destroy your local web development environment every time you do a major OS update... Don't use the built in Apache, PHP and MySQL. Use Homebrew to install independent web server components.
Now to your problems:
/etc/hosts is a file not a directory. Each line is a separate record. The line they gave 127.0.0.1 apache.local just means that your local computer will be accessible from http://apache.local. This hosts file can be used to avoid DNS lookups for any website.
The conf file you are referring to is the Apache VirtualHost file? OS X is very protective about files in etc. Have you tried sudo? If you change the permissions to your user, Apache may not be able to function.
We've been working hard on a sandbox server. We installed WordPress to it from scratch. I created the database, and imported the previous database into it. The user and password both have been created.
Right now, our error is "403 Forbidden: You don't have permission to access / on this server". I can't access any of the files by typing in the server IP address,though we see and control everything as root via Putty, or manage it through FileZilla. Root is the owner of all WP files/folders.
I found this source: WPBeginner-403-Error-Fix and am currently changing the permissions on the files; the folders are done and the permissions are set to 755. File permissions are being set to 644. Out of all the resources we had referred to, it never mentioned WP requiring specific permissions. I got right onto that today. While this is running, I still get the message after the folder permissions were changed, and as the file permissions are being processed:
You don't have permission to access /wp-admin/login.php on this server.
We also had a bootstrap file located in the same place as the WP installation / contents (this was a test). The bootstrap is very much accessible: the CSS/JS folders with the supporting content can be seen if you type the ipaddress/directory for the bootstrap version... you can see the files and structure. If you type in ipaddress/boot.html, it runs it flawlessly. If we try referring to anything with WP, it does not like it and throws the 403 error.
There is no .htaccess, I read online it would generate via permalinks in the panel. But we can't even see the panel. It's currently .htaccessOLD (from when we imported our old WP contents to the dev server, from the production site), so there should be no interference.
None of us has installed WP directly, the guy who did it previously no longer is part of the company, so we are becoming lost in this process.
Edit: Plugins were disabled via renaming convention, however, WP actually regenerated this folder.
Edit (2): With the permissions set, and the plugin/theme deactivated, it still does not run due to 403.
Weird... my answer didn't post yesterday as I had thought.
So- we solved it. The permissions were set accordingly for all directories/files, the issue was the server configuration. Just triple check the server configuration file (usually httpd.conf on current servers) to ensure it points to the directory containing the WP contents.
If this is still a problem to some people, and you swear that the httpd.conf file is correct, it does not hurt to double check your directories. The directories should be permission 755. Files should be 644, excluding the wp-config.php (that ought to be set for permissions 455).
Thank you for helping us troubleshoot! We really appreciated it! :)
I created a LAMP stack instance on Google Compute Engine and followed the instructions for setting up FTP as described here.
Most of this worked, I can view files and ftp files to my local workstation FROM the instance. The problem is I can't ftp files TO the instance. Whenever I try to do so Filezilla gives me a permission denied error.
I tried right clicking on the "www" folder in Filezilla to set the permissions but that didn't work.
I'm guessing that write permissions have to be set by SSH-ing to the server and executing some sort of command but I'm not sure how to do that.
Any ideas as to how to go about doing this would be appreciated.
By default the /var/www directory is owned by 'www-data' on the debian instance. You should add your user to the 'www-data' group, and give the directory +rw (read and write) for groups.
I am trying to get phpMyAdmin working on a server with IIS7.5 installed. We have done the following and cannot get access to phpMyAdmin working:
MySql installed
Windows Server 2008 running IIS7.5
Followed this tutorial: enter link description here
Created a new site and added phpMyAdmin directory beneath it as an application (I can see the subdirectories of the phpMyAdmin root on this application)
Navigating to the subdomain set up for the application indicates we do not have sufficient permissions. I gave users and administrator read/write access for the site and the application:
HTTP Error 401.3 - Unauthorized
You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.
I feel like we are very close, but I am unsure what other permissions need to be set to gain access.
I'm not used to IIS 7.5, but I believe typically you would need to give the IIS user read permission on the phpMyAdmin folder, files, and subdirectory. You mention giving permission to users and administrators, but I don't think the IIS user would fall in to either of those categories.