why php can not see /tmp files
i have simple test.php page:
<pre><?php system("ls -la /tmp"); ?></pre>
which always shows just: .
and ..
folders and nothing else in browser.
in the command line:
1) ls -la /tmp
2) sudo -u http ls -la /tmp
3) php test.php
4) sudo -u http php test.php
all this commands returns full list of directory files/subdirs.
What is the reason for this???
And problem is "/tmp" folder related because ls -lah /usr
works OK.
i tested this on 4 comps (one of them was debian with php 5.0.6 and there php shows all files OK like i expected, other 3 comps has php7 and shows empty /tmp).
update:
even after adding http to sudoers file and running 'sudo ls /tmp', problem is the same on php versions >7.
but runing 'system("echo aaa > /tmp/aaa.txt; ls -la /tmp") shows .
, ..
, and aaa.txt
file owned by http:http. So is this some new php restriction and how it is posible to interfere on /tmp files only.
update2:
but aaa.txt is not inside /tmp, and by running find /tmp -name aaa.txt
, i see that it is inside /tmp/systemd-private-2cf1853410ad4ade980ec17e883771c3-httpd.service-lZ22gS/tmp/aaa.txt
.
so finaly it is related to something called "systemd /tmp isolation"... that i need to learn about.
Changing true
to false
inside: /etc/systemd/system/multi-user.target.wants/httpd.service
:
[Service]
PrivateTmp=false
...
solves my problem, but i am wondering is it possible to avoid this without changing service file.
files systemd php tmp sandbox
add a comment |
i have simple test.php page:
<pre><?php system("ls -la /tmp"); ?></pre>
which always shows just: .
and ..
folders and nothing else in browser.
in the command line:
1) ls -la /tmp
2) sudo -u http ls -la /tmp
3) php test.php
4) sudo -u http php test.php
all this commands returns full list of directory files/subdirs.
What is the reason for this???
And problem is "/tmp" folder related because ls -lah /usr
works OK.
i tested this on 4 comps (one of them was debian with php 5.0.6 and there php shows all files OK like i expected, other 3 comps has php7 and shows empty /tmp).
update:
even after adding http to sudoers file and running 'sudo ls /tmp', problem is the same on php versions >7.
but runing 'system("echo aaa > /tmp/aaa.txt; ls -la /tmp") shows .
, ..
, and aaa.txt
file owned by http:http. So is this some new php restriction and how it is posible to interfere on /tmp files only.
update2:
but aaa.txt is not inside /tmp, and by running find /tmp -name aaa.txt
, i see that it is inside /tmp/systemd-private-2cf1853410ad4ade980ec17e883771c3-httpd.service-lZ22gS/tmp/aaa.txt
.
so finaly it is related to something called "systemd /tmp isolation"... that i need to learn about.
Changing true
to false
inside: /etc/systemd/system/multi-user.target.wants/httpd.service
:
[Service]
PrivateTmp=false
...
solves my problem, but i am wondering is it possible to avoid this without changing service file.
files systemd php tmp sandbox
try to useexec()
andshell_exec()
– Nullpointer
Feb 15 '17 at 6:34
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
Have you tried withsudo
? it's work on my system !
– Nullpointer
Feb 15 '17 at 6:38
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
Could you runstat /tmp
in both cases and edit that into the question too?
– Michael Homer
Feb 15 '17 at 7:15
add a comment |
i have simple test.php page:
<pre><?php system("ls -la /tmp"); ?></pre>
which always shows just: .
and ..
folders and nothing else in browser.
in the command line:
1) ls -la /tmp
2) sudo -u http ls -la /tmp
3) php test.php
4) sudo -u http php test.php
all this commands returns full list of directory files/subdirs.
What is the reason for this???
And problem is "/tmp" folder related because ls -lah /usr
works OK.
i tested this on 4 comps (one of them was debian with php 5.0.6 and there php shows all files OK like i expected, other 3 comps has php7 and shows empty /tmp).
update:
even after adding http to sudoers file and running 'sudo ls /tmp', problem is the same on php versions >7.
but runing 'system("echo aaa > /tmp/aaa.txt; ls -la /tmp") shows .
, ..
, and aaa.txt
file owned by http:http. So is this some new php restriction and how it is posible to interfere on /tmp files only.
update2:
but aaa.txt is not inside /tmp, and by running find /tmp -name aaa.txt
, i see that it is inside /tmp/systemd-private-2cf1853410ad4ade980ec17e883771c3-httpd.service-lZ22gS/tmp/aaa.txt
.
so finaly it is related to something called "systemd /tmp isolation"... that i need to learn about.
Changing true
to false
inside: /etc/systemd/system/multi-user.target.wants/httpd.service
:
[Service]
PrivateTmp=false
...
solves my problem, but i am wondering is it possible to avoid this without changing service file.
files systemd php tmp sandbox
i have simple test.php page:
<pre><?php system("ls -la /tmp"); ?></pre>
which always shows just: .
and ..
folders and nothing else in browser.
in the command line:
1) ls -la /tmp
2) sudo -u http ls -la /tmp
3) php test.php
4) sudo -u http php test.php
all this commands returns full list of directory files/subdirs.
What is the reason for this???
And problem is "/tmp" folder related because ls -lah /usr
works OK.
i tested this on 4 comps (one of them was debian with php 5.0.6 and there php shows all files OK like i expected, other 3 comps has php7 and shows empty /tmp).
update:
even after adding http to sudoers file and running 'sudo ls /tmp', problem is the same on php versions >7.
but runing 'system("echo aaa > /tmp/aaa.txt; ls -la /tmp") shows .
, ..
, and aaa.txt
file owned by http:http. So is this some new php restriction and how it is posible to interfere on /tmp files only.
update2:
but aaa.txt is not inside /tmp, and by running find /tmp -name aaa.txt
, i see that it is inside /tmp/systemd-private-2cf1853410ad4ade980ec17e883771c3-httpd.service-lZ22gS/tmp/aaa.txt
.
so finaly it is related to something called "systemd /tmp isolation"... that i need to learn about.
Changing true
to false
inside: /etc/systemd/system/multi-user.target.wants/httpd.service
:
[Service]
PrivateTmp=false
...
solves my problem, but i am wondering is it possible to avoid this without changing service file.
files systemd php tmp sandbox
files systemd php tmp sandbox
edited Feb 15 '17 at 23:16
Gilles
528k12810581583
528k12810581583
asked Feb 15 '17 at 6:32
Asain Kujovic
999915
999915
try to useexec()
andshell_exec()
– Nullpointer
Feb 15 '17 at 6:34
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
Have you tried withsudo
? it's work on my system !
– Nullpointer
Feb 15 '17 at 6:38
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
Could you runstat /tmp
in both cases and edit that into the question too?
– Michael Homer
Feb 15 '17 at 7:15
add a comment |
try to useexec()
andshell_exec()
– Nullpointer
Feb 15 '17 at 6:34
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
Have you tried withsudo
? it's work on my system !
– Nullpointer
Feb 15 '17 at 6:38
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
Could you runstat /tmp
in both cases and edit that into the question too?
– Michael Homer
Feb 15 '17 at 7:15
try to use
exec()
and shell_exec()
– Nullpointer
Feb 15 '17 at 6:34
try to use
exec()
and shell_exec()
– Nullpointer
Feb 15 '17 at 6:34
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
Have you tried with
sudo
? it's work on my system !– Nullpointer
Feb 15 '17 at 6:38
Have you tried with
sudo
? it's work on my system !– Nullpointer
Feb 15 '17 at 6:38
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
Could you run
stat /tmp
in both cases and edit that into the question too?– Michael Homer
Feb 15 '17 at 7:15
Could you run
stat /tmp
in both cases and edit that into the question too?– Michael Homer
Feb 15 '17 at 7:15
add a comment |
2 Answers
2
active
oldest
votes
I am running Ubuntu 18.04 and /usr/lib/systemd did not contain any services for http or apache2. However, I executed the following command:
sudo find / -mount -type f -exec grep -e "PrivateTmp" '{}' ';' -print
and found in /lib/systemd/apache2.service the PrivateTmp=true. Changing true to false and executing
systemctl daemon-restart
systemctl restart apache2
fixed the problem.
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
add a comment |
<pre><?php system("ls -la /tmp"); ?></pre>
..
always shows just: . and .. folders and nothing else in browser.
..
What is the reason for this???
Thats all the system()
function is designed to do - it only returns the last line of output from the shell command.
So then why does a command exist that only gives you one useless line of output? possibly because system() allows you to capture the exit code of the shell process (if you pass $return_var
as a second argument) whereas shell_exec
- which does give you all the shell output, doesn't give the exit code!
So if you want all the output AND the exit code you can use exec()
, but exec
is a hassle because the full output is only available through the reference array $output
which you then have to loop through to see your output.
Also, seeing as you are playing around in /tmp
, you should be aware newer versions of PHP-FPM using systemd
to manage the php-fpm daemon will pass a setting which blocks execution of php files from running out of tmp.
I have php 7.0.1 running on my laptop, but then I did an install of 7.1.1
and discovered they are now embedding this little directive
PrivateTmp=true
in the systemd service file. you need to set it to false if you want to run php scripts from /tmp
for more background on that particular issue
https://serverfault.com/questions/614781/php-script-cant-access-tmp-folder
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f345122%2fwhy-php-can-not-see-tmp-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I am running Ubuntu 18.04 and /usr/lib/systemd did not contain any services for http or apache2. However, I executed the following command:
sudo find / -mount -type f -exec grep -e "PrivateTmp" '{}' ';' -print
and found in /lib/systemd/apache2.service the PrivateTmp=true. Changing true to false and executing
systemctl daemon-restart
systemctl restart apache2
fixed the problem.
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
add a comment |
I am running Ubuntu 18.04 and /usr/lib/systemd did not contain any services for http or apache2. However, I executed the following command:
sudo find / -mount -type f -exec grep -e "PrivateTmp" '{}' ';' -print
and found in /lib/systemd/apache2.service the PrivateTmp=true. Changing true to false and executing
systemctl daemon-restart
systemctl restart apache2
fixed the problem.
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
add a comment |
I am running Ubuntu 18.04 and /usr/lib/systemd did not contain any services for http or apache2. However, I executed the following command:
sudo find / -mount -type f -exec grep -e "PrivateTmp" '{}' ';' -print
and found in /lib/systemd/apache2.service the PrivateTmp=true. Changing true to false and executing
systemctl daemon-restart
systemctl restart apache2
fixed the problem.
I am running Ubuntu 18.04 and /usr/lib/systemd did not contain any services for http or apache2. However, I executed the following command:
sudo find / -mount -type f -exec grep -e "PrivateTmp" '{}' ';' -print
and found in /lib/systemd/apache2.service the PrivateTmp=true. Changing true to false and executing
systemctl daemon-restart
systemctl restart apache2
fixed the problem.
answered Dec 18 at 11:18
One In a Million Apps
112
112
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
add a comment |
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
I don't think you should change the one in /lib, as that is managed by the package; instead, copy it to /etc and make your modifications there.
– Jeff Schaller
Dec 18 at 11:43
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Thanks for the tip! I didn't realize there was a pecking order to how the systemd daemon processed files and that /lib shouldn't be touched. I'll make the change you suggested and retest.
– One In a Million Apps
Dec 18 at 11:49
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
Sure thing; check out freedesktop.org/software/systemd/man/systemd.unit.html where it says "Example 2. Overriding vendor settings"
– Jeff Schaller
Dec 18 at 11:52
add a comment |
<pre><?php system("ls -la /tmp"); ?></pre>
..
always shows just: . and .. folders and nothing else in browser.
..
What is the reason for this???
Thats all the system()
function is designed to do - it only returns the last line of output from the shell command.
So then why does a command exist that only gives you one useless line of output? possibly because system() allows you to capture the exit code of the shell process (if you pass $return_var
as a second argument) whereas shell_exec
- which does give you all the shell output, doesn't give the exit code!
So if you want all the output AND the exit code you can use exec()
, but exec
is a hassle because the full output is only available through the reference array $output
which you then have to loop through to see your output.
Also, seeing as you are playing around in /tmp
, you should be aware newer versions of PHP-FPM using systemd
to manage the php-fpm daemon will pass a setting which blocks execution of php files from running out of tmp.
I have php 7.0.1 running on my laptop, but then I did an install of 7.1.1
and discovered they are now embedding this little directive
PrivateTmp=true
in the systemd service file. you need to set it to false if you want to run php scripts from /tmp
for more background on that particular issue
https://serverfault.com/questions/614781/php-script-cant-access-tmp-folder
add a comment |
<pre><?php system("ls -la /tmp"); ?></pre>
..
always shows just: . and .. folders and nothing else in browser.
..
What is the reason for this???
Thats all the system()
function is designed to do - it only returns the last line of output from the shell command.
So then why does a command exist that only gives you one useless line of output? possibly because system() allows you to capture the exit code of the shell process (if you pass $return_var
as a second argument) whereas shell_exec
- which does give you all the shell output, doesn't give the exit code!
So if you want all the output AND the exit code you can use exec()
, but exec
is a hassle because the full output is only available through the reference array $output
which you then have to loop through to see your output.
Also, seeing as you are playing around in /tmp
, you should be aware newer versions of PHP-FPM using systemd
to manage the php-fpm daemon will pass a setting which blocks execution of php files from running out of tmp.
I have php 7.0.1 running on my laptop, but then I did an install of 7.1.1
and discovered they are now embedding this little directive
PrivateTmp=true
in the systemd service file. you need to set it to false if you want to run php scripts from /tmp
for more background on that particular issue
https://serverfault.com/questions/614781/php-script-cant-access-tmp-folder
add a comment |
<pre><?php system("ls -la /tmp"); ?></pre>
..
always shows just: . and .. folders and nothing else in browser.
..
What is the reason for this???
Thats all the system()
function is designed to do - it only returns the last line of output from the shell command.
So then why does a command exist that only gives you one useless line of output? possibly because system() allows you to capture the exit code of the shell process (if you pass $return_var
as a second argument) whereas shell_exec
- which does give you all the shell output, doesn't give the exit code!
So if you want all the output AND the exit code you can use exec()
, but exec
is a hassle because the full output is only available through the reference array $output
which you then have to loop through to see your output.
Also, seeing as you are playing around in /tmp
, you should be aware newer versions of PHP-FPM using systemd
to manage the php-fpm daemon will pass a setting which blocks execution of php files from running out of tmp.
I have php 7.0.1 running on my laptop, but then I did an install of 7.1.1
and discovered they are now embedding this little directive
PrivateTmp=true
in the systemd service file. you need to set it to false if you want to run php scripts from /tmp
for more background on that particular issue
https://serverfault.com/questions/614781/php-script-cant-access-tmp-folder
<pre><?php system("ls -la /tmp"); ?></pre>
..
always shows just: . and .. folders and nothing else in browser.
..
What is the reason for this???
Thats all the system()
function is designed to do - it only returns the last line of output from the shell command.
So then why does a command exist that only gives you one useless line of output? possibly because system() allows you to capture the exit code of the shell process (if you pass $return_var
as a second argument) whereas shell_exec
- which does give you all the shell output, doesn't give the exit code!
So if you want all the output AND the exit code you can use exec()
, but exec
is a hassle because the full output is only available through the reference array $output
which you then have to loop through to see your output.
Also, seeing as you are playing around in /tmp
, you should be aware newer versions of PHP-FPM using systemd
to manage the php-fpm daemon will pass a setting which blocks execution of php files from running out of tmp.
I have php 7.0.1 running on my laptop, but then I did an install of 7.1.1
and discovered they are now embedding this little directive
PrivateTmp=true
in the systemd service file. you need to set it to false if you want to run php scripts from /tmp
for more background on that particular issue
https://serverfault.com/questions/614781/php-script-cant-access-tmp-folder
edited Apr 13 '17 at 12:13
Community♦
1
1
answered Feb 15 '17 at 8:40
the_velour_fog
5,23533360
5,23533360
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f345122%2fwhy-php-can-not-see-tmp-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try to use
exec()
andshell_exec()
– Nullpointer
Feb 15 '17 at 6:34
@Ravi, i did, all have same results (i use php 'system' for question because it simplifies output)
– Asain Kujovic
Feb 15 '17 at 6:37
Have you tried with
sudo
? it's work on my system !– Nullpointer
Feb 15 '17 at 6:38
@Ravi, tested now, same problem with sudo too (added to sudoers user http, sudo ls -la /tmp ... empty) ... maybe it is php version related. some bug or new restriction/config
– Asain Kujovic
Feb 15 '17 at 6:47
Could you run
stat /tmp
in both cases and edit that into the question too?– Michael Homer
Feb 15 '17 at 7:15