Tuesday, January 31, 2023

Linux - Permission required to read a file in a folder

 1. If you are the owner of a directory, owner should have readable and executable permission for the directory to cd into it or list the content of the directory.

If you are not the owner of a directory, other users should have readable and executable permission for the directory to cd into it or list the content of the directory.

Click on it to read the content



2.
If you are the owner of a directory and owner has only readable permission for the directory, owner can list the files and sub-directories inside directory but owner cannot read the content of the files or list the content inside sub-directories. Owner cannot cd into the directory.

Click on it to read the content


If you are not the owner of a directory and other user has only readable permission for the directory, other users can list the files and sub-directories inside directory but owner cannot read the content of the files or list the content inside sub-directories. Other users cannot cd into the directory.

3. If you are the owner of a directory and owner has only executable permission for the directory, owner cannot list the files and sub-directories inside directory but owner can read the content of the files if owner knows the file name. Owner can cd into the directory.

If you are not the owner of a directory and other user has only executable permission for the directory, other user cannot list the files and sub-directories inside directory but other user can read the content of the files if other user knows the file name. Other user can cd into the directory.

Click on it to read the content


4. Complete directory structure of files and sub-directories follows above rules.

If any of the sub directories has missed the correct readable and executable permissions, the files and sub-directories of the directory cannot be listed or read based on the given permissions to parent directory. 

 

Click on it to read the content

If a sub-directory or a file has full permission but parent directory does not have readable or executable or both permissions then sub-directory content or files cannot be listed or read
based on the given permissions to parent directory.

Thursday, January 19, 2023

BDTask Sales ERP - Dashboard is not loading in php 8.0+

BDTask Sales ERP - Internal Server Error

Solution :

Enable logs in the file saleserp_v10/application/config/config.php

$config['log_threshold'] = 0;
to
$config['log_threshold'] = 1;
Check error in logs application/logs
if it is
ERROR - 2023-xx-xx xx:xx:xx --> Severity: error --> Exception: Unsupported operand types: string + int /var/www/html/saleserp_v10/application/modules/dashboard/views/home/home.php 452
Update file
/var/www/html/saleserp_v10/application/modules/dashboard/views/home/home.php

Change
   
     value='<?php $seperatedData = explode(',', $chart_data); echo html_escape(($seperatedData[0] + 10));?>' name=""

 

to

        value='<?php $seperatedData = explode(',', $chart_data); echo html_escape(((int)$seperatedData[0] + 10));?>' name=""
Now try again.

Friday, December 30, 2022

php error - Request entity too large. The requested resource does not allow request data with the post requests or the amount of data provided in the request exceeds the capacity limit

Wordpress - Request entity too large. 

The requested resource does not allow request data with the post requests or the amount of data provided in the request exceeds the capacity limit

Solution : 

Add in apache2.conf

LimitRequestBody 100000000
Update in php.ini
max_input_time = 300
max_execution_time = 300
post_max_size = 512M
upload_max_filesize = 512M

Restart Apache 2