On 28/06/06, Walter Faleiro <curtorkar at gmail.com> wrote:
> I am configuring a vsftpd server on CentOs 4.x.
> I need help on the following.
> I have changed the anon_root=/local/data
That's where anonymous users will start from.
You may also want to set local_root to the same thing, for your users
identified by group later on.
> Under /local/data I have four directories
>> When the user types ftp://myftpip He is presented with these four
> What I need to do is when he changes directory to setups, I dont want the
> contents/directories listed. But if he knows the name of the file/directory
> he can access it.
vsftpd makes a decent stab at honouring file permissions.
chmod o-r directory
should prevent the anonymous user getting a listing of a directory,
without blocking access to known contents.
> For /Temp the contents can be listed and the user of a particular group (say
> gid 345) can write to.
chgrp groupname directory
chmod g+w directory
together with write_enable=YES should allow the right users write to
chmod g+r to allow them list the contents; chmod o+r to allow others
list the contents.
> For FAQ The contents can be listed only if you know the directory/filename
> and be readable for users of gid 345
You can probably guess this one by now: +r on the directory to allow
listing, +r on the file to allow fetching. -r to disallow.
> I have been successful in hiding the directory, setups, FAQ,Public,Temp by
> giving hide_file=setups,FAQ,Public,Temp, but I actually need to hide the
> data withing these directories.
You probably had curly braces on the config line. But anyway,
hide_file probably isn't what you want if you want to hide all
filenames in a particular directory.
> Also I assume the gid 345 users can be given access I need based on
Depending on what else you want to allow or deny, it might be useful.
But for what you've said, it doesn't seem necessary.
> Kindly update with any howto link if possible.
Partly vsftp.conf, partly file permissions, if I understand you correctly.
You could consider a different approach, using guest, depending on who
else should have ftp access to the server.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!