vsftpd problem
Hello!
I own a linux server where is installed Fedora Core 3. I recently installed ftp server vsftpd. It's now configured that every user in /home has rights to access to his own account (directory) with a full control. Everything works fine, except one thing. I would like to create a new user account with full access to public directory. That means if someone (anonymous) would enter to browser ftp://myip he would be redirected to public dir XY and able to download/list files (without upload permission). There would be also user ABC which would have all permissions only to dir XY (his home directory), so he could upload and delete files (if logged in of course). Is there any way to do that? And another question related to domain name. It's actually very simply. I would like to have domain name (which I already registered on eurodns.com) for my ip. So if someone would enter ftp://mydomain it would be the same if entered only my IP address. How can I do that? Thank you very much for further help. Regards, krneki |
Here is the situation:
I chmod-ed /var/ftp/pub to 755 permissions. Anonymous users have now permission only to read and copy files from public dir. The user which I created with home directory on /var/ftp has exact permissions - only permission to view and copy files, but I get 500 error if I try to upload something. However, that's not what I need. I still want to allow anonymous users to view files (without upload/delete permission) and created user to upload/delete/create/view permissions on public directory. Maybe there is a trick with chroot and chmod? |
I used to know vsftpd and as far I remember it should have something with anonymous access in vsftpd.conf. Yeap. Man page says:
anonymous_enable Controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognised as anonymous logins. Default: YES anon_upload_enable If set to YES, anonymous users will be permitted to upload files under certain conditions. For this to work, the option write_enable must be activated, and the anonymous ftp user must have write permission on desired upload locations. Default: NO |
Here is my config file. Is everything OK with settings?
Quote:
|
Everything looks OK.
You might want to have another look at: Quote:
[EDIT] One more thing. Quote:
[/EDIT] |
Just took another read of your post and realized i had missed something. If i understand correctly, you want to have a directory where one local user has full access, but when anonymous users login they get that same directory but only with read permissions, right?
If this is so, you'll need to create a new local user with a home directory and shell access. The settings in vsftpd.conf are already correct to allow this new user full access to his/her home directory. Next you'll need to set the anonymous user's root directory to the same home directory of the new local user. Code:
anon_root=/home/new_local_user/ Now for your next question regarding Domain Name. Is your external IP (the one assigned by your ISP when you conenct to the internet) static and doesn't change each time you connect? Or is it dynamic and changes each time? |
I considered Notwerk's proposition and here is what I get:
I made new user named ftp2 and change anon_root to /home/ftp2. User ftp2 can now login into his account and he has full control of home directory. The only problem is that anonymous users can't access to this directory (/home/ftp2). They everytime get error: "550 Failed to change directory". Anonymous users are still enabled in vsftpd.conf. I also tried to set 777 permissions to /home/ftp2 but nothing changed. Any new ideas? |
Make sure you chmod /home/ftp2 recursively (change permissions on all files and directories inside it).
If there are sub-directories inside /home/ftp2 then you'll need to allow all users "execute" permissions on the directories, in order to permit them to see what's inside them. |
All times are GMT -5. The time now is 12:33 AM. |