Sirmadsen Posted September 25, 2023 Posted September 25, 2023 Long story short. I made a bunch of subdomains to sort all my storage into subdomains. Files into download.domain.com. Images into images.domain.com etc. So far so good. Apparently the permissions that is set when creating a subdomain do not work properly when then changing the storage in ACP. So not everything was moved but ACP still deleted the content left over on the original storage. After a lot of back and forth I decided to restore from a backup, but dumb as I am I didn't make a full backup before I started the storage move, since I didn't know permissions would cause so many issues. So, I restored all the files which I had a backup of, but the database backup was 1 month old. Now, IPS is working correctly so far but I cannot save storage settings. I'm getting... RuntimeException: (0) #0 /home/client/domain/applications/core/modules/admin/overview/files.php(418): IPS\_File::getClass() #1 /home/client/domain/system/Dispatcher/Controller.php(107): IPS\core\modules\admin\overview\_files->settings() #2 /home/client/domain/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute() #3 /home/client/domain/admin/index.php(13): IPS\_Dispatcher->run() #4 {main} Backtrace #0 /home/client/domain/init.php(1038): IPS\_Log::log() #1 [internal function]: IPS\IPS::exceptionHandler() #2 {main} ...When saving storage setting after selecting a new location. All permissions are set and in order. There is no errors in the ACP support section.
Sirmadsen Posted September 25, 2023 Author Posted September 25, 2023 Update. I don't know what happened but all of a sudden I can save the storage changes but something is automatically setting the permission to 666 in the end destination which cancels the transfer. Same thing when setting storage settings back to standar, the entire Uploads folder automatically get permission 666.
Marc Posted September 25, 2023 Posted September 25, 2023 You can force permissions if you need to do so for your server, by adding a constant to your server. You can see how to do this in the following location
Sirmadsen Posted September 25, 2023 Author Posted September 25, 2023 Would this be safe enough to use? \define('IPS_FOLDER_PERMISSION','0777'); \define('FOLDER_PERMISSION_NO_WRITE','0755'); \define('IPS_FILE_PERMISSION','0755'); \define('FILE_PERMISSION_NO_WRITE','0644');
Randy Calvert Posted September 26, 2023 Posted September 26, 2023 In general you should not be using those directives at all. If you explicitly need to because of how your host configures its server, that would be a question for them. If it does not work though, remove the change.
Sirmadsen Posted September 26, 2023 Author Posted September 26, 2023 7 minutes ago, Randy Calvert said: In general you should not be using those directives at all. If you explicitly need to because of how your host configures its server, that would be a question for them. If it does not work though, remove the change. Well, I didn't have any issues up until I did what I described in first post. So it's not a hosting problem, it's a lazy me problem for not properly backing up my files before attempting something.
Recommended Posts