• Resolved devlink1337

    (@devlink1337)


    Hello together,

    we recently had a strange problem when creating new folders and files on a WP installation under nginx.

    We couldn’t resolve the problem when changing directory permissions for our users.
    MLP created dirs only with chmod 750 what was not enough for letting us upload images in that folder. All the resolving with the bashrc and other config files did not lead to success.

    We tried to look up the code of the plugin and changed a little bit of the code from maxgalleria-media-library.php.

    Changes we made that succeeded:

    On line 403:

    $perms = $stat['mode'] & 0000664;

    and directly below line 1604 we added following:

    @chmod($new_folder_path, 0755);

    Please update your plugin with these snippets so that the functionality is given under nginx. We hadn’t any problems with apache on our local test system but I will test it again with a local nginx installation and look if theres maybe only a mistake in our configuration. But those changes in code leads to not look further in the configuration because everything else worked as expected.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AlanP57

    (@alanp57)

    Yes, these changes are working and will be included in the next release. Thank you.

    Thread Starter devlink1337

    (@devlink1337)

    I discovered that there might be an issue with our configuration. I successfully tested it on a local nginx installation, installed the plugin there and it worked fine.
    The changes are a good workaround just as I said everything else worked as expected on the server. I would definately recommend the changes made, in case some other stupids do the same mistakes as we did ??

    Thread Starter devlink1337

    (@devlink1337)

    I see you really have updated the code but just for your information, you updated the wrong line of code.

    Line 1606 and 1607

          if(mkdir($new_folder_path)) {
    		  @chmod($new_folder_path, 0755);
    [...]

    realised it after updating the plugin.

    Plugin Author AlanP57

    (@alanp57)

    Ok, this change will be included in the next release.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Solved: Problem with permissions on nginx’ is closed to new replies.