Forum Moderators: phranque

Message Too Old, No Replies

Setting up so access through scripts is denied

         

fathomboy

3:46 pm on Sep 21, 2016 (gmt 0)

5+ Year Member



How would I go about setting up a server so that I can have addon domains, and when someone tries to access ftp, they cant use a php file to access /home/<name> because their website would be /home/<name>/websites/<theirSiteRoot>/ and of course they have a www folder which is where the public folder would go.

Please tell me if there is a way to restrict file access through any language to /home/<name> and even /home/<name>/websites

Please don't tell me it isn't a good idea, this is so my friend can have his own site and stuff along side mine, because he is new, and just starting to learn php

phranque

7:32 pm on Sep 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if the Server Root is /home/<name>/websites/<theirSiteRoot>/ then a web script shouldn't be able to access parent directories.

this assumes there aren't weird symbolic links in the web directories and you have configured proper permissions and ownership of directories.

whitespace

8:27 am on Sep 22, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



You wouldn't generally use an "addon domain" if you need to restrict access. That is... if by "addon" domain you are referring to something like cPanel's "Addon Domains"? How are you defining your "addon domains"?

...a way to restrict file access through any language


Again, you wouldn't really use a "language" to restrict FTP access... FTP access is determined by the server config and file/directory permissions/owners. (?)