Re: [Hampshire] vsftpd confusion

Top Page

Reply to this message
Author: Ian Grody
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] vsftpd confusion
On Friday 09 September 2011 18:45:16 Mike Burrows wrote:
> >> The owner or group ID of vsftp must be writeable to that folder,
> >> doesn't have
> >> to be 666/777, but say vsftp user is vsftp and group is vsftp, just
> >> make the
> >> folder writeable to that group, chown :vsftp /home/ftp; chmod g+w
> >> /home/ftp
> >>
> >> Either UID or GID writable will work, but if the folder is owned by
> >> your user
> >> too, you may just want to make the folder that vsftp writeable to group.
>
> Most if not all the files associated with vsftpd seems to be root/root.
> Did I screw up the install?
>
> -rw-r--r-- 1 root root 1392 2008-02-01 19:30 AUDIT
> -rw-r--r-- 1 root root 2908 2008-02-01 19:30 BENCHMARKS
> -rw-r--r-- 1 root root 1046 2008-02-01 19:30 BUGS
> -rw-r--r-- 1 root root 4142 2011-03-25 14:10 changelog.Debian.gz
> -rw-r--r-- 1 root root 828 2011-03-25 14:10 copyright
> drwxr-xr-x 8 root root 4096 2011-09-08 22:45 EXAMPLE
> -rw-r--r-- 1 root root 4697 2008-02-01 19:30 FAQ.gz
> -rw-r--r-- 1 root root 1361 2008-02-11 22:42 README
>
> btw, what do you mean by ..."vsftp user is vsftp"? Who is the vsftp
> user, the anonymous person logging in?
>

It was just an example...

Usually when you run an ftpd, the service will initially call as root (to open
port 21) then drop to a less privilaged user (for security).

vsftp was merely an example as UID it may drop too.

For security, the ftpd might deny 777/666 set folders and files and only allow
ones owned or in the group in which the ftpd belongs to.

It may (or may not) run as another user. I use 'lsof' for a majority of
determining what does what, although there are netstat commands that can tell
you what user opens what port. (lsof -i is the command I use).

> Cheers
> MIke
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------