Hey,
I have a MODx plugin that creates a folder whenever a client page is setup (IE the Page created has a certain parent id).
This all works wonderfully and I can then upload user related stuff to their directory via the resource manager.
I can also view the folders via FTP but can’t change permissions or things like that, getting a
550 Could not change perms on /public_html/assets/images/nameOfClient: Operation not permitted
I don’t know who the user thinks I am when I log in via FTP, (username)?? Unfortunately I know very little about the server where MODx is hosted, or them in general when it comes to the administrative side of things.
Does anyone have any advice how they would go about making files uploadable (via FTP) to my dynamically created folders?
Thanks for any help!
Taff
Adrian Lawley: www.adrianlawley.com
-
MODX Staff
- 10,725 Posts
Yes, use configuration that runs PHP using suexec so that the PHP user and your account are one in the same. Most hosts however, use mod_php and in this case, PHP executes as the webserver user account. In these situations, you’ll have to use PHP to manipulate files/folders created with PHP, and you will not be able to manipulate it with your FTP user unless you can get access to change permissions/ownership on them (which will never be the case with shared hosting).
Firstly, thanks for your reply OpenGeek.
As far as I know the server is a dedicated server on rackspace where my client (a web-design agency) hosts all their client sites.
In these situations, you’ll have to use PHP to manipulate files/folders created with PHP, and you will not be able to manipulate it with your FTP user unless you can get access to change permissions/ownership on them
So I somehow need to login as superuser, chown chgrp on folders created dynamically?
I also delved a little deeper and with a little PHP snippet found that the script that is generating the folders is giving the "ownership" to "nobody". Would it constitute a security issue to allow all FTP accounts access to folders owned by "nobody", and is this in fact possible?
Thanks again for your help!
Taff
Adrian Lawley: www.adrianlawley.com
Thank you very much, you’ve been a great help!
Adrian Lawley: www.adrianlawley.com