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
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 ) );
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