Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Unable to change file permission of uploaded file.
  • I'm on Ubuntu and I'm using the fuelphp Upload class to handle my uploads. Here is my configuration:

    $config = array(
                        'path' =>"path/to/upload/folder",
                        'auto_rename'   => true,
                        'randomize' => true,
                        'ext_whitelist' => array('webm', 'ogg', 'mp4'),
                        'create_path'   => true,
                        'path_chmod'    => 0777,
                        'file_chmod'    => 0777,
                    );

    Which I give directly to 'Upload' class 'process' static method like this:

    Upload::process($config);

    I've set 'file_chmod' to '0777' but when I check the file permission of the uploaded file I don't get a 0777 instead I get a 0644. How can I fix this?
  • HarroHarro
    Accepted Answer
    Which version of Fuel?

    I don't see an obvious reason why that would not work. Does your webserver user have the rights to change the permissions?
  • Thanks for the help Harro, I needed to change the ownership of my uploads folder to my webserver user.


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion