How do i direct user FTP login to storage folder?

Got problems with your B2 or B3? Share and get helped!
Post Reply
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

How do i direct user FTP login to storage folder?

Post by 86ivar » 11 Nov 2011, 06:06

Hi.

When i conect bubba with my username im directed to my user folder.
Is it possible to direct it to the storage folder instead?

Optionally is it possible to make a password on the anonymous login so noone can view the storage files without a password?

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: How do i direct user FTP login to storage folder?

Post by Cheeseboy » 11 Nov 2011, 17:33

Hello,
Is it possible to direct it to the storage folder instead?
Yes:

Code: Select all

sudo vi /etc/proftpd/proftpd.conf
Find the line that says DefaultRoot and change it to:

Code: Select all

DefaultRoot     /home/storage/
Regarding anonymous, I think the practice of letting anyone in using the email address as password has been around for so long that it would not be practical to change it. Why don't you just disable anonymous completely and set up a general account for your friends/users?

Best regards,

Cheeseboy

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 15 Nov 2011, 08:50

Tried it but does not seem to work, maybe this setting is disabled etc?
Thanks for helping.

Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Re: How do i direct user FTP login to storage folder?

Post by Hammer » 03 Dec 2011, 09:50

Neither did it for me until I restarted proftpd.
(Just go into admin web interface/services and disable ftp, hit update, enable it and hit update again.)

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 15 Dec 2011, 13:25

Yeah! that did it. ty!

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 08 May 2013, 04:17

Cheeseboy wrote: Regarding anonymous, I think the practice of letting anyone in using the email address as password has been around for so long that it would not be practical to change it. Why don't you just disable anonymous completely and set up a general account for your friends/users?
Cheeseboy
When i have anonymous access set on i can login with no username or password at all, is this normal?

gonk
Posts: 93
Joined: 30 May 2012, 01:53

Re: How do i direct user FTP login to storage folder?

Post by gonk » 08 May 2013, 06:25

86ivar wrote:When i have anonymous access set on i can login with no username or password at all, is this normal?

That is a very normal behaviour.
Anonymous FTP access means that everyone can access the account without needing a password.
If that is not desirable then you should disable anonymous FTP and create separate password protected accounts.

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 08 Jun 2013, 09:15

Right now I have set DeafaultRoot to /storage/. How can i log into my home folder without changing DeafaultRoot? Optionally add the storage folder in my home folder.

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: How do i direct user FTP login to storage folder?

Post by Cheeseboy » 08 Jun 2013, 09:38

Right now I have set DeafaultRoot to /storage/. How can i log into my home folder without changing DeafaultRoot? Optionally add the storage folder in my home folder.
You can't. That is the definition of "root", it is the top level you will be able to access through FTP. You could play around with symlinks, but I guess that there is some kind of security concern behind your current setup, and that would probably undermine just that.

proftpd is more flexible than that tough, you can set the root directory by group, so different rules apply to different users.
Have a look at this:
http://www.proftpd.org/docs/howto/Chroot.html

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 23 Jul 2014, 07:53

How can I change this:?
When i put default root as /home, I get directed to /home/myuser.
But I want proftpd to direct me to the root /home and not /home/myuser
Tried to make it chroot by default root to ~

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: How do i direct user FTP login to storage folder?

Post by Cheeseboy » 23 Jul 2014, 15:29

86ivar wrote:How can I change this:?
When i put default root as /home, I get directed to /home/myuser.
But I want proftpd to direct me to the root /home and not /home/myuser
Tried to make it chroot by default root to ~
Hi,

From the documentation on the DefaultRoot directive at http://www.proftpd.org/docs/directives/ ... tRoot.html :
If the DefaultRoot directive specifies a directory which disallows access to the logged-in user's home directory, the user's current working directory after login is set to the DefaultRoot instead of their normal home directory.
In other words, if the user that logs in has a home directory under /home, they will land there automatically. It is not the chrooted "root" though", that is /home as he/she can still move up there.

This is a question for the proftp forums, however I can tell you that the answer is:

Code: Select all

DefaultChdir                    /home/
(also documented on the proftpd site....)

Kind regards,

Cheeseboy

86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i direct user FTP login to storage folder?

Post by 86ivar » 24 Jul 2014, 18:09

Worked, thanks!
Ill try to chec the forums next time!

Post Reply