Change ftp location

Hey guys,
I come with a new "problem"/question, to you.. i've been starting to look for a way to change the default location of the ftp folder of each user. Now my problem is, if i want for a user to just give him access to a ftp on a specific mounted storage, how would i do that, so that the rights would be automatically set and no bash commands to be involved ???

by default you can set a ftp to point to a folder created inside a client, that by default will point to the webpage of the client, or a folder created earlier...
so the path would be /var/www/clients/client1/web1/ftp for example.
but i want to put it on a separate hdd's for example that i've added in raid and mounted to /mnt/sdd/ and to point it to the folder ftp . In where should i edit the php to change the folder location and user asignment.
Thanks

Now my problem is, if i want for a user to just give him access to a ftp on a specific mounted storage, how would i do that, so that the rights would be automatically set and no bash commands to be involved ???

Click to expand...

The path of the ftp user can be set on the options tab of the ftp user.

now create the client to which the ftp accounts will go to, to do so, go to
Client -> Add Client -> put in username whatever you like ftpusers, and a pass if you'd like. If you want you can moddify limits and stuff now or later, click Save.

Next create a domain, so go to Sites -> Website -> Add new website -> and for
client select ftpusers, and for
domain you can put ftpusers.local
auto-subdomain ( we don't need it so.. ) check none
Be sure that the domain is Active marked
and click save,

Now it's time to set back the default settings in System -> Server Config -> Your Server -> Web -> and replace the info Website basedir, path and symlinks to the default copy pasted values in notepad

Click Save and now go to Sites -> Folder -> Add new Record
and now Website will appear ftpusers.local , select it, and add a folder named test for example be sure it's Active and click save ( or any other ftp, but note it down, we'll need it later )

Go to Folder Users -> Add new record -> select the folder created earlier, set a user and ( not necesarry ) a pass for it ( this is just for web view, but the domain doesn't really exist and ppl can't access it, and even if they would with no pass it isn't accessible ) -> Save

Then go to FTP User and click add new FTP User -> add new FTP-User -> set user and pass for them , be sure to check ftpusers.local for website, and then go to Options, where you'll see that the Directory path, and to the default location ( for me it was /mnt/dev/sdd/ftp/ ) make it /mnt/dev/sdd/ftp/web/test
Web is by default the web locale default, can't change it,
Test, is the folder created earlier.
This is how to create folders and ftp users just these for ppl, with no real web-site real access.

Also if you'd like, you can set the clients rights ( System -> Edit User -> ftpusers ) to just "Sites" and be sure to make the start module to Sites and so you can give the user and pass to someone who will admin ftp users for the domain ftpusers.local with no other access to other accounts.

I've tried a bunch of things to get it to work just for ftp, but it seems for the user type account, when i try to edit the rights, if i disable admin module and the user type is just a user, i can add users but can't change the directory path, if i leave admin module checked can change the ftp directory path.
If i uncheck admin module, but i set the user type to be an admin, it works, wtf...

1) Only admins can change the path of a ftp user for security reasons. If a user would be able to change the path, he might be able to access files which are not allowed to him.

2) The changes that you did in the global website path settings will cause your server to fail. Paths without placeholders for client_id and website_id will crah your system as soon as you try to add a second website.

I've added a new website right now, with a new client, and the website is up and working individually, while the ftp accounts the old ones work, and i've created a new one for ftpusers.local site and it worked, and a ftp user for the new domain. All works out perfectly.
Everything works out pretty damn good so far, nothing crashed and i can upload/download to all of them

LE: I've done this with 3 new domains nothin' crashed, and the client_id and website_id is just modified in what i've did for 1 domain. In sql the mods are done and the chown has been done automatically to that ftpusers.local so i don't need to do anything else there. i just add a new folder in that domain and all is good, and the users can be accessed from any other domain but they do not have access to my main website and domain, and they are on a different raid that is set just to hold temp work files. This is why, i've modded the location of the files just for 1 domain and the reverted them back, so that i'll have the other files of the domain in the old spot