Permission issue

CyberPanel: Latest version / update
OS: Ubuntu 20, 22.

This is for Opencart cms website deployed on cyberpanel server.

Problem: Some folders like “storage” and “cache” become not writable with default permissions of 755 and showing permission errors. I have to set 777 on them to function properly and fix permission errors.

This problem has started recently in cyberpanel within last 2 or 3 months.
Earlier I had no issues using default permissions on any directory/file and 755 permission was working absolutely fine.

This is happening even on new cyberpanel installed server.
This is happening maybe because of some recent changes in newer updates either in panel or in LiteSpeed.

Permission 777 is making my site vulnerable and non-secure. This is not the right permission set for web directories.

So, kindly take this into consideration and fix this bug or provide us a solution.

Thank You.