Code: Select all
public_html
|--->galleries
|--->gallery
|--->imagesI need to be able to write/delete files on gallery, from script running on galleries, and upload files (and delete them) to images, always from script on galleries.
In one of the shared servers I tested my script, it worked fine. All the folders have 755 permission
On the other hand, in another server I had to chmod 777 both gallery and images to not to get "is not within the allowed path" kinda errors.
(In both cases, all the folders were created through an FTP accnt, not by a php script)
Can anyone ellaborate about this issue, how should it be solved (if there is a way), and what are the risks of having 777 directories?