[BlueOnyx:26869] Re: Permission denied

Michael Stauber mstauber at blueonyx.it
Sun Mar 24 14:41:02 -05 2024


Hi Roy,

> I checked the permission of /web on the 5106 server and it is drwxr-xr-x 
> nobody site1.  On the 5211R server it is drwxrwsr-x nobody site1.   This 
> is the only thing I can see that is different.  The vsite settings on 
> all 4 servers have the web ownership set to nobody.  If I change 
> ownership of to the site admin, I can ftp the content on both 5211R 
> servers from Filezilla and the Windows command prompt.  I have no issue 
> ftp’ing to the 5106 servers with /web owned by nobody.  What am I missing?


When you move from 5106R to 5211R there sure are some differences that 
were introduced in the last 16 years. I'll just mention the two that 
come into play here in your specific situation:


Web directory location:
=======================

On 52106R it used to be this:

/home/sites/<FQDN>/web/

Now it's like this, because we needed an extra directory layer to 
implement Chrooted Jails:

/home/sites/<FQDN>/wwwroot/web

You can read about the Chrooted Jails here:

https://www.blueonyx.it/news/245/79/5210R-Development-Jailkit


Multi-PHP Vsite:
================

Vsites can individually use different PHP implementations *and* 
different PHP versions:

https://www.blueonyx.it/multi-php

This is also where "Web Ownership" comes into place. The /web folder of 
a Vsite *must* be owned by a siteAdmin of the Vsite in question. PHP 
scripts will then be executed with the UID/GID of that user.

And naturally: /home/sites/<FQDN>/wwwroot/web is then owned by the 
UID/GID of that siteAdmin in question.

When you create a new Vsite on 5210R or 5211R, the directory 
/home/sites/<FQDN>/wwwroot/web may be owned by "nobody" and the group 
that the Vsite belongs to. But for PHP to work you are supposed to 
configure a "Web Ownership" by assigning a siteAdmin as owner of /web. 
That will then change the UID/GID of /web and will configure PHP to work.


As for data transfer from the old to the new server?

You can use an FTP client on your workstation and FileZilla is as good a 
choice as anything else. I would suggest you configure /web to be owned 
by a siteAdmin on the 5211R and then FTP as that user. That should work.

Or you could use SSH to move the data.

SSH into the old server. Then use ...

scp -r /home/sites/<FQDN>/web/ 
root@<new-server>:/home/sites/<FQDN>/wwwroot/web/

You may have to adjust <FQDN> to the name of the Vsite and 
root@<new-server> must of course have the <new-server> replaced with the 
hostname of your target server.

The above command will recursively copy /home/sites/<FQDN>/web/ from the 
old server to /home/sites/<FQDN>/wwwroot/web/ on the new server.

Be sure to use the "Web Ownership" page of the Vsite in question *after* 
the transfer to fix the UID/GID of the /web folder again. Toggle it back 
to "nobody", save and then set it back to the desired "siteAdmin" to 
have the GUI fix the ownership of the freshly transferred files.

Please let us know if you need anything else.

-- 
With best regards

Michael Stauber


More information about the Blueonyx mailing list