apache2 permissions denied, django project - django

I have a linux server (ubuntu) and I uploaded a project, in my project, I try to generate a pdf with reportlab, using some fonts for the created pdf.
I am having problems with permissions for reportlab. When I check out the error log in apache (/var/log/apache2/error.log), the error that appears is:
reportlab.pdfbase.ttfonts.TTFError: Can't open file "recursos/fonts/Lato-Regular.ttf"
I already gave full permissions (chmod 777) and also changed the owner to apache (chown :www-data) to the whole project, but the same error appears.
In my local machine, works perfectly.

Related

Remote gdb with Eclipse Oxygen 3a

I've read several guides/stackoverflows but not found a similar situation/solution.
I have my remote ssh working (can browse files).
I don't get why I need a local Windows application (although I have a compiled .exe it's not the version I want to debug which is only on the Linux server).
When I try and launch a remote debug session it immediately fails with
Exception occurred during launch
Reason:
Error during file upload.
and below in the details
Could not write file: <my windows exe path>
Permission denied
...
The aforementioned file is writable and in any event I also started eclipse as administrator just in case.
In any event the .exe is irrelevant. I just want to debug code remotely.
(I know all about gdbserver...happy to manually kick that off if need be....don't think I'm there yet though)
Below is the options page I'm presented with:
Had the same experience on TI Code Composer Studio Version: 9.3.0.00012.
This seems to happen while uploading the cross compiled binary from host to target. If you set the check box "Skip download to target path" the error should disappear.
I propose to workaround the upload.
Setup a web server on the host, the line python.exe -m http.server --directory \source\hello\Debug\ would be sufficient
Run wget on the target, see screenshot

Files are not found in server, but they are uploaded

I am trying to install opencart TVS on VPS server which is running Centos 7. I have used some tutorials, done everything like they said. Opencart files are uploaded into server but however install/index.php file is not found.
So I tried to upload an image to server and see if it shows or not. Nope, it does not show.
I have installed Centos Panel. Created account over there. Created database there also. The problem that I cannot see uploaded files and I think that install/index.php is not shown due to the same problem.
Apache: Apache version: Apache/2.4.39
MySQL version: 10.1.38-MariaDB
Server IP: http://141.136.44.45
File is listed in Home/USERNAME/public_html/
So as understand the file should be reached like: http://141.136.44.45/1.png (it is uploaded in Home/USERNAME/public_html/1.png

AWS EC2 RHEL7 Instance permission problem

I have set all the folders in my /var/www/upload directory to 755. But still my php application hosted on that server is not performing file uploads. Please tell me how to fix this permission problem and how my php file uploading will be working fine.
It does not shows any error. Just file is not moved to the intended folder.

GeoServer and CentOS. Permissions denied when trying to create a layer

I have a Django/Python map application. This application uses gdal library to create geotiffs and tiled layers. Everything works absolutely ok - geotiffs are nicely created, folders with tiles are also created. But there is a problem - I can not create a store and publish a layer, because geoserver says, that it does not have permissions to write to my Django folders. The error message looks like so:
'/var/www/django_project/django_project/layers/tiled/test_layer1/0/0.prj', "[Errno 13] Permission denied:
And multiple similar error messages. When I check permissions to test_layer1 folder, I see that it is 777 and the owner is apache (not apache tomcat, but apache httpd). I guess the whole problem is in the owner - geoserver for some reason is not able to write to these folders (inspite of 777 permisions). But I'm not sure what owner and what permissions I should set, so that both Django application (or perhaps I should say apache) could write to this folder and GeoServer could read and write to it. By the way, GeoServer is running on top of Apache Tomcat.

bootstrap/autoload.php - Failed to open stream: permission denied

I'm working with a website running on laravel. The site works fine on my local through Homestead, no problems.
Recently, I pushed the git repo up to a server that never had this site running on it before. I set everything up right (had some nginx config issues for a while, but got those all sorted out). Nginx has the public folder set as the site root, so it hits the proper index page when you load the page.
What I'm getting is a 500 error. My error logs reveal the following is the reason:
site_root/public/../bootstrap/autoload.php - Failed to open stream: permission denied
in
site_root/public/index.php on line 22
I can confirm that the bootstrap folder and the autoload.php file are both accessible by the web user, and have permissions that should allow access.
I've read a few cases online of people solving this issue with a 'composer install'. I tried updating composer, doing an install, and dumping its cache. I also tried removing the vendor folder (which had been a part of the git repo), and running composer install to regenerate it. None of these have worked. Happy to supply any info that will help. This is Laravel 5.2 running on Ubuntu Server 14.04 with nginx, all on an AWS box.
Solved it. This was actually an issue with site-wide permissions. They were set to 770 instead of 775. I suspect that I can and should restrict them more. For now, I'm just happy to have it loading again.
Moral of the story is to check your permissions site-wide, not necessarily just on the file which gives you the fatal error. You may continue to get the same fatal error, despite permissions being wide-open on the mentioned file. If so, look for permissions issues elsewhere.