Networking Forums

Networking Forums > Computer Networking > Linux Networking > proftpd user account and directory access

Reply
Thread Tools Display Modes

proftpd user account and directory access

 
 
Dhruv
Guest
Posts: n/a

 
      01-07-2004, 02:09 AM
hi,

I have a question about proftpd. I have installed it and it seems to
be working fine.

Now I have accounts with their home directory (i.e.
/home/UserAccountExample).

I also have accounts on the machine without a autogenerated home
directory (I manually edited the /etc/passwd file).

I want to have users that I specify which directory they can access
using ftp. (i.e. user - jon has access to /www/html/jon directory).

however this is not working. Only users with their autogenerated home
directories can get in using ftp client,the others are booted out.

I have setup my linux server a certain way and need the proftpd server
to work the way I have specified.

Now when I login from the shell using a account without its own system
generated home directory I get this:

No directory /www/html/eyeuniversal!
Logging in with home = "/".
bash: /www/html/eyeuniversal/.bash_profile: Permission denied

I look at the system messages (/var/log/messages) and it reads:

session opened for user eyeuniversal
eyeuniversal chroot ("~/"): No such file or directory
-error: unable to set default root directory
session closed for user eyeuniversal

Another thing is that all my users belong to webAuthor group that have
765 permission on /www and all the way down the tree.

Any help would greatly be appreciated

Thanks

Dhruv
 
Reply With Quote
 
 
 
 
Jozef Kutej
Guest
Posts: n/a

 
      01-08-2004, 11:07 AM
hi.

you must have home directories for your ftp users. it doesn't matter
that they are the same. for example /www for all. proftp chroots to this
direcotry so that users can't access direcotries above it.

edit out the passwd and change homedir.
username:x:uid:gid:name:homedir:shell

jozef.

Dhruv wrote:
> hi,
>
> I have a question about proftpd. I have installed it and it seems to
> be working fine.
>
> Now I have accounts with their home directory (i.e.
> /home/UserAccountExample).
>
> I also have accounts on the machine without a autogenerated home
> directory (I manually edited the /etc/passwd file).
>
> I want to have users that I specify which directory they can access
> using ftp. (i.e. user - jon has access to /www/html/jon directory).
>
> however this is not working. Only users with their autogenerated home
> directories can get in using ftp client,the others are booted out.
>
> I have setup my linux server a certain way and need the proftpd server
> to work the way I have specified.
>
> Now when I login from the shell using a account without its own system
> generated home directory I get this:
>
> No directory /www/html/eyeuniversal!
> Logging in with home = "/".
> bash: /www/html/eyeuniversal/.bash_profile: Permission denied
>
> I look at the system messages (/var/log/messages) and it reads:
>
> session opened for user eyeuniversal
> eyeuniversal chroot ("~/"): No such file or directory
> -error: unable to set default root directory
> session closed for user eyeuniversal
>
> Another thing is that all my users belong to webAuthor group that have
> 765 permission on /www and all the way down the tree.
>
> Any help would greatly be appreciated
>
> Thanks
>
> Dhruv


 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      01-11-2004, 04:20 AM

"Dhruv" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ...
> hi,
>
> I have a question about proftpd. I have installed it and it seems to
> be working fine.
>
> Now I have accounts with their home directory (i.e.
> /home/UserAccountExample).
>
> I also have accounts on the machine without a autogenerated home
> directory (I manually edited the /etc/passwd file).
>
> I want to have users that I specify which directory they can access
> using ftp. (i.e. user - jon has access to /www/html/jon directory).


A: The directory has to exist, with the correct ownership.

B: I believe that ProFTPd requires the same root-cage structure that wu-ftpd
requires, with critical libraries and a local etc/passwd and etc/group file
at the chroot root of the user's directory where it says "/./".

> however this is not working. Only users with their autogenerated home
> directories can get in using ftp client,the others are booted out.
>
> I have setup my linux server a certain way and need the proftpd server
> to work the way I have specified.


Can you work with vsftpd instead? I've come to really like it, especially
because I can use the system's /etc/passwd files but still get chroot like
behavior.


 
Reply With Quote
 
Brad Olin
Guest
Posts: n/a

 
      01-11-2004, 04:13 PM
On Sun, 11 Jan 2004 00:20:39 -0500, "Nico Kadel-Garcia"
<(E-Mail Removed)> wrote:

>B: I believe that ProFTPd requires the same root-cage structure that wu-ftpd
>requires, with critical libraries and a local etc/passwd and etc/group file
>at the chroot root of the user's directory where it says "/./".
>


The authors of ProFTPd have taken extra steps to gather all this
information before it change-roots itself and then drops privlages. So
in this case you don't need all the extra files that you would need with
other FTP daemons.

There was a bug in PAM at one point that it needed the file
etc/security/pam_env.conf to exist so it could log that the ftp session
had closed. But that is not ProFTPd and I'm not certain if it has been
fixed.


Brad
--
"From childhood's hour I have not been as others were...
I have not seen as others saw." Edgar Allen Poe

Bradley W. Olin
http://www.bwo1.com
 
Reply With Quote
 
Brad Olin
Guest
Posts: n/a

 
      01-11-2004, 04:43 PM
On 6 Jan 2004 19:09:10 -0800, (E-Mail Removed) (Dhruv) wrote:

>I want to have users that I specify which directory they can access
>using ftp. (i.e. user - jon has access to /www/html/jon directory).
>

It is true that the user has to have home directory, but... ProFTPd has
an option to allow cd to follow symlinks. So you can give a traditional
home directory for said user, then add a symlink to the html content.
Something like...

cd ~$USR ; ln -s /www/html/$USR www ; chown $USR.$GRP /www/html/$USR

Be careful with the follow symlinks option and restrict it to users who
must have it. I don't recommend it on a system wide bases.


Brad
--
"From childhood's hour I have not been as others were...
I have not seen as others saw." Edgar Allen Poe

Bradley W. Olin
http://www.bwo1.com
 
Reply With Quote
 
 
 
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User is unable to access their user directory Nauip Windows Networking 1 04-08-2008 02:32 AM
what is the difference b/w exchange user and active directory user basim alvi Windows Networking 1 02-19-2005 01:15 AM
Limited User Account Access to Internet on Wireless Network Ed Wireless Networks 9 02-04-2005 04:32 PM
Proftpd with user aliases and directory limitations not being applied Mike Linux Networking 0 11-09-2004 09:55 PM
Need hep with Accessing user files on NT4 server shared user directory Terry Windows Networking 1 09-07-2003 06:54 AM



1 2 3 4 5 6 7 8 9 10 11