Why do I need different directory permissions now?

SYSTEM INFORMATION
OS type and version Deb 11
Virtualmin version 7.7

Hi,

I would like to understand/learn what has changed. At least I think something has changed, since there has been some updates to the server and to Virtualmin since I created a new virtual server.

I just created a new virtual server and put a website on it that normally works out of the box. The log/ dir always has 755 permisson and that was good enough. But now I get the error the dir cannot be written. Changed it to 775 and now it works.

But why?

755 should be enough cause the file has the correct owner, the username of the just create virtual server. Any thoughts?

does it? what sort of website from what sort of box and how was it uploaded into your VS

Hi, Stegan

Thanks for your interest, but I think I found it already :joy_cat: sorry to waste time.

It was due the PHP running in CGI mode, and that way the php scripts are executed as “www-data” user, so the permission of 755 was not enough. I put it back to FPM mode as I am used to, and this way it is executed as the virtual server main user, which is the same as the file owner. Problem solved and I prefer FPM anyway.

(Not sure, maybe it was different before. But for those that look for the same to apply as default when creating a new Virtualmin, goto:
Virtualmin → System Settings → Server Templates → Default Settings → PHP options → Default PHP execution mode: and select your preference.)

Glad you fixed it.

so often these sort of issues can be traced back to where the website files came from or what they are expecting to be in-situ on the VS.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.