Portal Home > Knowledgebase > Articles Database > Directory / File Permissions


Directory / File Permissions




Posted by ePlanetDesign, 02-07-2011, 02:50 PM
Hello, I have two php files, "file1.php" and "file2.php". "file1.php" has a form that writes data to "file2.php". The two files are in the same directory. We know that file2.php must be writable but does the directory these files are in also have to be writable? I ask because I can't try it on my dev server as it runs suphp where all permissions are 755/644. Thanks for any answers.

Posted by mahesh2010, 02-08-2011, 03:37 AM
Hi, Just provide File permission to 0777 to directory recursively for testing if it is a one way process ie content is written to file 2.php

Posted by instantIT, 02-08-2011, 04:07 AM
Does 755 for directories and 644 for files work for you? In suphp, it should work without any problem and it is unlikely to have 777 file permission.

Posted by ePlanetDesign, 02-08-2011, 04:38 AM
Yes, 755 / 644 works for suphp. The directory that holds these files is under several more directories which can't be 777 (if running DSO). File 2 can be 777 for DSO but not the directories. Thanks



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Cloudlinux down? (Views: 814)

Language: