Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd January 2013, 01:24
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 3rd January 2013, 08:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,214 Times in 4,089 Posts
Default

Quote:
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 ???
The path of the ftp user can be set on the options tab of the ftp user.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 3rd January 2013, 13:01
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
The path of the ftp user can be set on the options tab of the ftp user.
true that but when i try to upload smth it says permission denied... err 553
new ftp location is /mnt/dev/sdd/ftp/
Reply With Quote
  #4  
Old 3rd January 2013, 13:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,214 Times in 4,089 Posts
Default

Does the folder belong to the user and group of the website?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 3rd January 2013, 13:24
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

that's the problem i've mentioned, how to do so, without interfering from the command line
Reply With Quote
  #6  
Old 3rd January 2013, 13:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,214 Times in 4,089 Posts
Default

Quote:
that's the problem i've mentioned, how to do so, without interfering from the command line
If you want to use a folder, then it has to exist and belong to the right user. You can e.g. write a plugin for ispconfig that creates the folder and assign it to the ftp user add event.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 3rd January 2013, 13:38
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

here we go thought there was such a script wrote, and i had my work cut off for will start working on it
thanks
Reply With Quote
  #8  
Old 3rd January 2013, 15:16
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

i've came up with a small workarround untill i finish my script...

for those whom have the same "problem" you can do the following,

log into your server and create the folder you want to store you ftp accounts, for me it was

sudo mkdir /mnt/dev/sdd/ftp

that's all, now

Go to ISPConfig admin meniu -> System -> Server Config -> Server Configuration -> select server -> Web Tab -> and now...

Open Notepad -> you'll need it later to get set back the default settings so don't close it

Copy paste the info from Website basedir, path and symlinks to notepad and replace it with the path you want to use for ftp accounts. ( don't close notepad just minimize it )

For me it was like this,

Website basedir from /var/www -> /mnt/dev/sdd/
Website path from /var/www/clients/client[client_id]/web[website_id] -> /mnt/dev/sdd/ftp/
Website symlinks from /var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/ to /mnt/dev/sdd/:/mnt/dev/sdd/ftp/

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.

That's all hope it helps.
Reply With Quote
  #9  
Old 3rd January 2013, 16:02
fbsoft fbsoft is offline
Junior Member
 
Join Date: Dec 2012
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Bug i guess

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...

Last edited by fbsoft; 3rd January 2013 at 16:04.
Reply With Quote
  #10  
Old 3rd January 2013, 16:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,214 Times in 4,089 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pureftp-d change default ftp port tokamak Installation/Configuration 5 10th August 2012 19:07
FTP very ODD problem (imho) Jivedue Server Operation 7 19th September 2006 23:43
ProFTP & SuSe 10 latcarf Server Operation 26 28th March 2006 03:23
How to change location? Brenton Installation/Configuration 1 16th March 2006 11:30
WEB UI FTP not working gimhan90 Installation/Configuration 2 16th March 2006 08:03


All times are GMT +2. The time now is 22:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.