contao / check

Contao Check
GNU Lesser General Public License v3.0
47 stars 23 forks source link

file permission check #82

Closed kaeptn2lvl closed 9 years ago

kaeptn2lvl commented 9 years ago

on a 1und1 webhosting php is able to write and create files and directories. I ve checked it myself with a very simple script: $testdir=@mkdir('test'); echo var_dump($testdir); if($testdir){ $ourFileName = "test/testFile.txt"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); } Testfiles and folder were visible after running the script. but contao checks 9.7,10.0, and newest one are telling me that the php process does not have file creation rights... which is not true, also it tells the wrong permissions "705", but it is actually "777"

leofeyer commented 9 years ago

What exactly does the Contao check say?

kaeptn2lvl commented 9 years ago

contao_check contao_check2 contao_check3

kaeptn2lvl commented 9 years ago

btw. 9.7, 10.0 and current version say the same

leofeyer commented 9 years ago

We just have to add 705 and 604 to the list of known chmod values.

kaeptn2lvl commented 9 years ago

perfect and thx.

kaeptn2lvl commented 9 years ago

also could it be that "core/library/Contao/File.php" does use a similar method for checking? Because from there I get sometimes "PHP Fatal error: Uncaught exception 'Exception' with message 'Cannot create file' "

But that is another issue I did not dive into yet, and I am not sure if it is my installation, or some extension... so just wondering...

leofeyer commented 9 years ago

Fixed in cfb142f7866ebcb79d549628b9d0c84227e5819d.