All Questions
Tagged with php permissions
54
questions
0
votes
1
answer
133
views
php-fpm and nginx security isolation not working....or may be my understanding is not correct
I followed the following tutorial to do isolation of my two websites.
https://www.vultr.com/docs/use-php-fpm-pools-to-secure-multiple-web-sites/
Here is what I did:
Created two users and then ...
0
votes
2
answers
7k
views
PHP file_put_contents: Failed to open stream: Permission denied
I want to store images using PHP, so I am using the following code:
$encodedCard = isset($_POST["card"])? $_POST["card"] : null;
$name = isset($_POST["fn"]) ? $...
0
votes
0
answers
42
views
How to start an external program on the Linux computer on which WWW-PHP is running, from non-CLI PHP?
I used to use Windows, with nginx and PHP. A localhost-only webserver for my own use. In my web "control panel", I had various very time-saving shortcuts. For example, I was able to click on ...
0
votes
1
answer
659
views
WSL2 is not handling file permissions properly, unable to write files from PHP
I am running nginx, mariadb and php8.2-fpm on my WSL2 Ubuntu server successfully, all running as user www-data just fine, however, I cannot upload files from the web interface. When I attempt to, the ...
0
votes
0
answers
121
views
Why can't I use localhost to open a file I moved, even though the permissions are the same and I changed DocumentRoot in Apache configuration
I am learning to use Apache on macOS Monterey. I have a simple test file test.php:
<?php
echo "Test";
I put this file in my home directory (/Users/my_username) and update my Apache ...
0
votes
1
answer
578
views
'The requested resource was not found on this server' error in IIS
I have configured IIS (ver 10) in Server 2022 edition and added few sites which including php,Dot net technologies etc. The sites were working fine except some DB issues which i was working on it. ...
0
votes
0
answers
765
views
How to avoid permissions issues when using PHP to create folders and store files?
I have a Laravel project and part of the code creates folders and stores photos inside it.
Each user has his own folder, but if he did not upload anything yet then this folder does not exist.
Then the ...
0
votes
1
answer
3k
views
PHP shell_exec() script running from CPanel terminal but not from ajax POST call
On my website, I have a javascript function that has a POST ajax call to a PHP file on the server (a GoDaddy VPS running CentOS 6), which executes a python script via shell_exec() and returns the ...
0
votes
1
answer
6k
views
Allow php to run shell script with sudo permission
command php -v is working when I execute simple shell_exec('./script.sh'); but when I use sudo it doesn't work without sudo service stop command is not working.
var_dump(shell_exec('sudo bash ./...
0
votes
1
answer
1k
views
ACL for www-data user set to r--, Apache (PHP) still can't read files
My PHP script needs access to some files that are located in a completely different directory.
I have set the ACL for the www-data user to have read permission, but the PHP file_get_contets() ...
1
vote
0
answers
1k
views
FastCGI PHP-FPM autoload.php permission [closed]
I installed LEMP both with RH and REMI, and I have the problem as in PHP-FPM has no permission to require autoload.php and php_info(); works fine. I can require any other file but this. I also tried ...
0
votes
1
answer
1k
views
php-fpm and mkdir() permission denied - but libphp7-zts.so works fine
I have Concrete5 site which I need to move to php-fpm from libphp7-zts.
I've configured PHP-FPM as normal with Unix socket and PHP (for example "PHP info") is being served fine. I've made sure that ...
1
vote
1
answer
9k
views
Modify the file 'config.inc.php' for XAMPP, PHPMyAdmin & MySQL setup
I installed XAMPP and subsequently set a password for PHPMyAdmin & MySQL, which requires me to modify the file 'config.inc.php' to add my password to it. However, I simply can't find a way to ...
1
vote
4
answers
10k
views
Laravel file permissions for apache
I'm installing a Laravel app on a Centos 7 distro. I'm using PHP 7.2 and I've successfully installed apache and my project.
I was able to get the Apache splash page to show but as soon as I point my ...
0
votes
0
answers
68
views
Windows user command line permissions
My PHP service is started by SYSTEM user. But I couldn't execute this command on PHP:
http://localhost/execute.php file tries to execute this command:
D:\wamp\www\convert\OfficeToPDF.exe D:\wamp\www\...