Jump to content

Recommended Posts

Posted

Hey there,

I am creating my GUI for my MVC PW Module. And I like to create a directory and a php file in the /site/templates folder.

I am using php as the hawiaknl and the owner of the /site/templates folder is hawiaknl

But i get permission denied every time

I tried 755, 777 but that shouldnt matter caus I am the owner right?

Maybe I am just htinking wrong, could someone help me out?

(the script is executed from /site/modules/MvcModule/MvcModule.module)

Like so

<?php
$h = fopen($path.$template->name.'.php', 'w') or die("Cannot generate controller file" . $path.$template->name);
?>
Posted

Is the script not more likely to be running as the Apache or php user? (Will probably depend on Safe Mode/suEXEC/php running as cgi, etc etc.)

Posted

Is the script not more likely to be running as the Apache or php user? (Will probably depend on Safe Mode/suEXEC/php running as cgi, etc etc.)

Any idea how I can check this?

I used posix_getpwuid(posix_geteuid()); and it showed hawiaknl

Posted

Your best bet is to do something like this:

if(!is_writable(wire('config')->paths->templates)) {
  $this->error("Please make your /site/templates/ dir writable to use this module."); 
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...