Don't getting Permission to access a php file on apache2 - server

I was trying to test an php application on my apache2 server. I am using LAMPP stack.
I have given the path address in following format-
http://localhost/folder/file.php
And got following result-
You don't have permission to access /folder/file.php on this server.

To get the detailed answer for this question you may read the following question and its answers
How do I set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal?

Related

fail2ban and owncloud.log file

I am using the following configuration, ubuntu 16.04 apache2 php 7.0 owncloud 10.0.3. I think I have made an error when I setup ownclound. The data directory lives in /var/www/owncloud/data ( I believe that owncloud.log resides in this folder). I have deployed fail2ban and the issue that I am having is that fail2ban cannot access the data folder because I ran sudo chown -R www-data:www-data /var/www/owncloud/. The only way I access the log file is through the OWNcloud gui settings > general > log. where I can see the failed login attempts by me. I cannot seem to get Fail2ban to read the owncloud log.
I am new to ubuntu and Owncloud can anyone advise how to rectify this issue, owncloud is working fine and I am using ip addresses to restrict access to owncloud. Fail2ban was supposed to make the server secure so that I could open up owncloud to the internet.
Regards
Steve
You should change the permissions of the log file so that it can be read by everyone but written only by the php process. Do a 'chmod 755 /var/log/owncloud/owncloud.log'
By the way. I suggest that you migrate from Owncloud to Nextcloud. It is a full replacement, fully open source, more features and more secure. And it has a fail2ban equivalent brute force protection already build in :-)

Solr 5.2.1 Access denied when trying to startup through powershell

I have Solr version 5.2.1 normally it starts up fine with no issues, this morning I attempted to start Solr and I got the following issue:
Starting Solr on port 8983 from C:\solr-5.2.1\solr-5.2.1\solr-5.2.1\server
Access is denied.
Access is denied.
Direct your Web browser to http://localhost:8983/solr to visit the Solr Admin UI
I restarted the computer yet I still get this access denied issue, which I have not encountered before does anyone have the insight into why this is happening? Thanks
The issue was that full control windows permissions were required to be set for the directory Solr was in.
Just update java version to java 8
Run command:
sudo bin/solr start
For example:
Vostro-3550:/opt/solr-6.0.0$ sudo bin/solr start
Then Open Browser and the past:
http://localhost:8983/solr/

Getting the list of files in website's folder through terminal

I've configured Apache2 for a specific directory, so that it lists all its contents over HTTP (I put +Indexesin config).
I was wondering if it is possible to list the contents of that folder from my terminal? So basically instead of opening up a browser and visiting that directory over HTTP, is it possible to do it just from terminal?
Some ideas:
use ssh to connect to the webserver: ssh user#host ls /path/to/dir; requires ssh access obviously
add a cgi script to generate the output you want in a format (test/plain) you want

Giving matlab code sudo permissions? Unconnectable-connected ftp port

I'm trying to use this code to pull a bunch of data from the ModelNet data base located at vision.cs.princeton.edu I'm using the already written matlab code from the website itself; however, I'm encountering permissions errors whenever I run the code because wget (which the code uses) is located in a restricted directory in the server. Normally I would just use sudo; however, I can't seem to run sudo matlab as a command. My question is does anybody know a way to remotely run matlab code from a server and somehow give it permissions that sudo normally would give? Also, could someone try ftping to vision.cs.princeton.edu at port 80? For some reason I'm able to connect to that port, but the connection seems to be closed and I can't ping that address either I get 100% package loss.
Thanks
Use urlread instead of wget, this should fix your issues.

mysql daemon install as a service on windows

I just downloaded mysql 64 bit as a zip package from their website, extract it to c:\mysql
and added c:\mysql\bin to my path.
I then open a command prompt as administrator and run:
mysqld -install
To install the mysql server as a service. I then go to windows services and start MySQL (also tried sc start MySQL from cmd), but I get the following error message:
Upon inspecting the properties of the service, it shows the path as C:\Program Files\MySQL-5.6.17\bin\ instead of C:\mysql\bin. Any ideas why this is happening?
Use the FULL PATH of your mysql server exe
Try this:
"C:\mysql\bin\mysqld" -install
It turns out that the service installation routine expects the .exe to be at the MySQL default installation directory of C:\Program Files\MySQL-5.6.17\bin\
Your installation with the straightforward mysqld -install could work, albeit only partially, because you had the correct path under Windows PATH
This is certainly a great inadequacy in the MySQL documentation, which does not address this issue at all.
Knowing you might have resolved your problem one way or another, I still thought to post this here as it might be of help to someone with time!
Cheers.