On 23 Jul 2015, at 08:05, JDW wrote:
Thank you, David.
By the way, the “XXX” in the path mentioned in my opening post is where the name of my user account goes. Meaning:
/home/XXX/domains/mydomain.com/public_html/
So that implies that other users who access their web space on the same shared server via FTP would see something like this:
/home/YYY/domains/mydomain.com/public_html/
/home/ZZZ/domains/mydomain.com/public_html/
For their own areas, yes.
and so on.
So wouldn’t that imply that my shared host is “setup right” in terms of security?
As mentioned by Walter, it depends on whether users are limited to seeing only inside their own tree (chroot). From the fact that you can see the /home/YYY/domains part I would guess not, unless that is artificially stuffed back into the listing as a replacement string for the chrooted leading ‘/’. Your, and all other users, should see the top of their area (mydomain.com) as the root of their tree. That is, if you refer to ‘/’ you are really referring to /home/YYY/domains/mydomain.com but the upper part is invisible and inaccessible. The webserver however will not be running as you and therefore will be able to see the entire tree.
By the way, the following directory on my shared web host has 777 permissions (not created by me):
/home/XXX/domains/tmp/
I can use PHP to write cookie and header files into /tmp/, but when I use my FTP client (Transmit), despite the 777 permissions, I cannot delete files from it. The only way I can delete the files from /tmp/ is if I use “unlink(‘filename’)” in a PHP script. I cannot change the permissions on /tmp/ with Transmit either. But I can create a new folder in the /XXX/ directory and use Transmit to change permissions to whatever I want.
By the way, when I Get Info on a folder on my shared server via Transmit, it shows me Owner and Group info, but both show “ftp” rather than the true Owner and Group.
The owner and group that Transmit shows toy will be correct unless they use a modified ftp server that lies. But ‘ftp’ is only a name corresponding to a numeric ID, and there can be more that one name to an ID - the first returned on a lookup being the one displayed. (Multiple names for an ID is often discouraged, but only to avoid human confusion. Some database based name ↔ ID schemes my prevent it, but that’s contrary to Unix). There’s no technical reason why the webserver shouldn’t run as a user or group that gets called ‘ftp’.
David
dynamo mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options