New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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