When I create a php file it have not permission execute so I can't run php file.
I need to set permissions of that file. I want that all created php files have execute permission.
new creation file type is
-rw-rw-r-- 1 sohel sohel 0 Apr 11 15:43 test.php 3 1 Answer
You don't need to add execution permission on php files, install php5-cli:
sudo apt-get install php5-cliAnd now to run your php file, just type:
php test.phpAlternatively to really make it executable, add the php shebang:
#!/usr/bin/php -q
<?php
Print "Hello, World!";
?>And add the execution permission on your file:
chmod +x ./test.php 2