服务器上的写入文件无效,权限问题?

I have the very simple following php file:

<p>1 Some HTML, I am not losing my mind</p>
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "John Doe
";
fwrite($myfile, $txt);
$txt = "Jane Doe
";
fwrite($myfile, $txt);
fclose($myfile);
?>

When executed on command line, everything is perfectly fine, data is write to file. When I try to execute it on firefox browser, I saw the "Some HTML, I am not losing my mind" comment appears but nothing is written on the server.

Is this a permission issue? I am using ubuntu for server. Files are in public_html directory that has following permission:

bomble@ChemAlive:~$ ls -la public_html
total 24
drwxrwxr-x  4 bomble bomble 4096 Feb 18 11:22 .
drwxr-xr-x  8 bomble bomble 4096 Feb 18 09:42 ..
drwxr-xr-x 12 bomble bomble 4096 Feb 16 13:43 Website
-rw-rw-r--  1 bomble bomble   18 Feb 18 11:19 newfile.txt
-rw-rw-r--  1 bomble bomble  232 Feb 18 11:19 process.php
drwxrwxr-x  2 bomble bomble 4096 Feb 18 11:22 test

Thanks for help!