I’m trying to move a local Craft 3 site to a local server (hosted on 1&1).
The website itself runs fine, but for some reason I can only access the admin panel when the
web/cpresources folder has permissions set to
777, which I obviously don’t want. (EDIT: It also seems to work with
755, but the folder probably shouldn't be executable by everone, right?)
All other folders where Craft needs write access are set to
744, as per the install instructions, and as long as
755, everything else seems to work fine.
Does anyone have an idea what can be the issue and a possible solution here?
Unfortunately I don’t know which user PHP runs under, but as a standard web hosting setup, I would guess it should be able to write to the file system without open access for everyone, and again everything else seems to be working like normal.
I managed to get the user by running this code:
$username = posix_getpwuid(posix_geteuid())['name']; $echo $username;
The reported user is the same as my account, meaning php should run as the same user that owns the files.