• Hi! I am trying to use the participants database plugin that requires creating and then writing to a directory /wp-content/uploads/participants-database/. It says this directory cannot be created.

    When I use the file manager Filester to go look at my files, it says they all only have read permissions, not write permissions, so I can also not create the directory manually (and, even if the directory was created, my plugin still wouldn’t be able to write to that directory).

    What I have seen online says to use FTP to alter the permissions and create the directory manually, but when I try to do that it fails to connect to wordpress. I’m not sure if I’m just missing something obvious, or what else I could try?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author xnau webdesign

    (@xnau)

    This may be a question for your hosting provider because the permissions scheme for a server can vary depending on several things.

    If the application (WordPress) cannot create a directory (this is unusual) then you need to create it manually and yes, it needs to be writable, but so do any of the other directories in the wp-content/uploads/ directory.

    What you should do is check the permissions for other directories in wp-content/uploads/ and create the new directory with the same permissions. For most servers, this will be 744. Do not try to use 777, this will break things.

    I have the same problem. However I deliberately won’t let “plugins” directory to be written by the server. If a plugin needs to write something, it should write it to the “uploads” directory. It works for all other plugins and themes except for this one. You should consider writing service-worker.js in the uploads directory and serve it from there.

    Also Wordfence and other scanners issue warnings if the files in the plugin directory are different from the ones in the repository.

    Meanwhile, how can I simply disable this feature and thus not get push notifications I don’t need anyway?

    Plugin Author xnau webdesign

    (@xnau)

    Participants Database does not attempt to write to the plugins directory. With the default configuration, it only writes to the uploads directory, so you should be good.

    Thank’s for your answer and help!

    That’s not how it looks:

    PHP message: PHP Warning:  fopen({...}/wp-content/plugins/mailin/js/service-worker.js): failed to open stream: Permission denied in {...}/wp-content/plugins/mailin/sendinblue.php on line 647

    This error stopped when I switched “Activate Marketing Automation through Brevo” to “No”

    Plugin Author xnau webdesign

    (@xnau)

    That is referring to read access, I thought we were talking about write access.

    I don’t understand how this is related to the Participants Database plugin.

    Sorry. I probably miss understood the thread. However, it is about write access. Here’s the context

     $service_worker_file   = str_contains($site_url, self::URL_CHECK_STAGING)
                        ? self::PUSHOWL_STAGING_URL
                        : self::PUSHOWL_PRODUCTION_URL;
                    $js_content            = "importScripts('" . $service_worker_file . "');";
                    $service_worker_script = fopen($service_worker, "wb");
                    fwrite($service_worker_script, $js_content);
                    fclose($service_worker_script);

    Where $service_worker is

    const SERVICE_WORKER_FILE_URL = "/js/service-worker.js";
    $service_worker = __DIR__ . self::SERVICE_WORKER_FILE_URL;
     if ( ! file_exists($service_worker)) {
          self::install_service_worker_script($service_worker);
     }

    So obviously the plugin is trying to write to the file wp-content/plugins/mailin/js/service-worker.js

    And that’s what’s written

    const PUSHOWL_PRODUCTION_URL = "https://cdn.pushowl.com/latest/sdks/service-worker.js";
    • This reply was modified 6 months, 2 weeks ago by gresakg.
    Plugin Author xnau webdesign

    (@xnau)

    OK, but the plugin referred to in that call is named “mailin”, so not Participants Database.

    OMG, sorry. I messed up big time. I was looking for support for Brevo plugin and I made a search that included something about permissions, and this was in the results. I was sure the results were for the Brevo plugin, so I didn’t even check. Must have been late. Sorry!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘I only have read permission to my files but I need write permission, I think’ is closed to new replies.