Page 1 of 1

How do i direct user FTP login to storage folder?

Posted: 11 Nov 2011, 06:06
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?

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

Posted: 11 Nov 2011, 17:33
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

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

Posted: 15 Nov 2011, 08:50
by 86ivar
Tried it but does not seem to work, maybe this setting is disabled etc?
Thanks for helping.

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

Posted: 03 Dec 2011, 09:50
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.)

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

Posted: 15 Dec 2011, 13:25
by 86ivar
Yeah! that did it. ty!

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

Posted: 08 May 2013, 04:17
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?

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

Posted: 08 May 2013, 06:25
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.

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

Posted: 08 Jun 2013, 09:15
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.

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

Posted: 08 Jun 2013, 09:38
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

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

Posted: 23 Jul 2014, 07:53
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 ~

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

Posted: 23 Jul 2014, 15:29
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

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

Posted: 24 Jul 2014, 18:09
by 86ivar
Worked, thanks!
Ill try to chec the forums next time!