snehu Posted September 16, 2014 Share Posted September 16, 2014 I am using apache web server on linux. I am using php for coding. My php code is not able to read the files from /var/tmp folder. If apache itself creates some files in /var/tmp folder then php code is able to read it. Why this permission denied issues are there though full access permissions are given to each file? Quote Link to comment https://forums.phpfreaks.com/topic/291099-php-code-can-not-read-file-from-vartmp-folder-which-is-not-created-by-apache/ Share on other sites More sharing options...
trq Posted September 16, 2014 Share Posted September 16, 2014 What are the permissions on the files in question? Quote Link to comment https://forums.phpfreaks.com/topic/291099-php-code-can-not-read-file-from-vartmp-folder-which-is-not-created-by-apache/#findComment-1491266 Share on other sites More sharing options...
snehu Posted September 16, 2014 Author Share Posted September 16, 2014 I have given 777 permissions and also tried by changing the owner to apache by chown apache filename. In error logs it shows: failed to open stream. Permission Denied. Quote Link to comment https://forums.phpfreaks.com/topic/291099-php-code-can-not-read-file-from-vartmp-folder-which-is-not-created-by-apache/#findComment-1491268 Share on other sites More sharing options...
jazzman1 Posted September 16, 2014 Share Posted September 16, 2014 (edited) Why this permission denied issues are there though full access permissions are given to each file? it could be possible if the directory or the previous directory when the file is deployed has a 0 permissions to others. So, we need to see the output of: ls -la /var/tmp/the_name_of_the_file Edited September 16, 2014 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/291099-php-code-can-not-read-file-from-vartmp-folder-which-is-not-created-by-apache/#findComment-1491273 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.