PHP: confused about file permissions, cannot unlink setup file?

Qmgyzcfxwr

New Member
I created a \[code\]setup.php\[/code\] to handle MySQL table generation, and as an obvious precaution I added a way to delete it after it was finished. As using \[code\]unlink(__FILE__)\[/code\] is impossible to do, I added deletion code to \[code\]main.php?action=deleteconfig\[/code\] to unlink the file.\[code\]setup.php\[/code\] has permissions \[code\]777\[/code\], but it gives me a permission denied error when I unlink it.. My directory is \[code\]drwxr-xr-x\[/code\] and my \[code\]main.php\[/code\] is \[code\]-rw-r--r--\[/code\].Would I need to set \[code\]main.php\[/code\] to 777 as well before it can delete \[code\]setup.php\[/code\] ? I am confused about file permissions here and why they do not work.
 
Back
Top