• Resolved Pierre_02

    (@pierre_02)


    Hi Scott ?? !

    I have two “problems”.
    1/ There’s a problem with permissions. If the parent folder (who will contains the static files/folders) is set to 750 then all the files/folders dropped in it will inherit of this permission, (at least in my case) giving 404 or 403 errors ;).
    2/ I use SS in a multisite environment so, could you, please, set, by default, the “Temporary Files Directory” to “path_to_ss_plugin_folder/static-files/” + the “sanitized name” of the website (the name be the subdomain name or folder name depending of the MU config or perhaps a randomly setted name) and create that folder ?
    I ask you that, because if two persons generate their files in same time (it can occur) there will be a problem ;)…

    I haven’t understand the interest of setting by default the auto-adding wp-content/uploads as a directory to include files from :)… Could you, please, explain me ? For my part I have to quickly unset that parameter because it copy a lot of unnecessary files from there ;)…

    Thanks in advance for all your work and your support ?? !

    Amicably,

    Pierre.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Pierre,

    1. So you’re setting 750 on the parent folder of where the static files will go and that’s causing 404/403 errors when Simply Static runs? That’s really strange. Any particular reason for setting that? The simplest solution seems to be not setting that ??

    2. While Simply Static shares that directory, every time it runs it creates a sub-directory to store the files in which is a joining of the name of the plugin (“simply-static”) plus: (a) the ID of the blog/site, (b) the current time, and (c) the current user’s name. Between all of those, there should never be an overlap in directory names when generating files. But, if you run into an issue where that’s not the case, let me know.

    3. Regarding the auto-adding of wp-content/uploads, there was a good argument made for the addition of it in this thread.

    Basically, a lot of people had complained that Simply Static wasn’t including some files (usually images) that it needed to because the site was loading them in via AJAX. Since Simply Static can’t process AJAX requests, it doesn’t know that those images are needed, and they weren’t being included. By including everything in the uploads directory, you prevent that issue. I think for most people it’s probably a good default to include it. And, for folks like yourself that don’t want to do that, you can just remove that line from Additional Files & Directories.

    I hope that helps!

    Best,
    Scott

    Thread Starter Pierre_02

    (@pierre_02)

    Hi Scott :).

    1/ I didn’t set that by myself :). It’s an automated process executed during the adding of a domain in thecPanel. And as my host add automatically a special Let’s encrypt folder (for the certificate), I can’t “deploy” correct rights easily ;)…

    2/ I didn’t know that. That’s a cool news ?? !

    3/ Ah, ok. I, now, have understand :). I therefore continue to manually remove the emoji script and the wp-content/uploads folder ;).

    Thanks Scott.

    Amicably,

    Pierre.

    Hi Pierre,

    Regarding point #1, I’m trying to think of a good fix for that. I could add a setting in Simply Static for which permissions to use for files/directories, though I haven’t heard any requests for that yet.

    Another short term option for you, may be to create a subdirectory within that 750 directory, and set whatever permissions you want on the subdirectory, and then serve your files out of that subdirectory, if possible?

    Or you could just manually change the permissions of the files afterward, of course, but that’s a fair bit of work every time you want to deploy your static files.

    I’m open to other ideas?

    Best,
    Scott

    Another option is to copy whatever the permissions were for the temporary file, e.g.:

    copy( $temp_file, $save_file_as );
    chmod( $save_file_as, fileperms( $temp_file ) );

    Thread Starter Pierre_02

    (@pierre_02)

    Hi Scott :).

    No don’t change anything for the moment. I’ll investigate longer on that “problem” and let you know the issue in an longer using time ;).
    Anyway, thanks for the ideas ;).

    Amicably,

    Pierre.

    Sounds good! Let me know.

    Best,
    Scott

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘1 problem, 1 request and 1 question’ is closed to new replies.