LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   permissions/ownership on /var/ftp for vsftpd (https://www.linuxquestions.org/questions/red-hat-31/permissions-ownership-on-var-ftp-for-vsftpd-147780/)

pioniere 02-18-2004 06:54 PM

permissions/ownership on /var/ftp for vsftpd
 
I have set up vsftpd on my RH 9.0 server. We are allowing anonymous read-only access to our network users. I am able to successfully get connected to the ftp server via anonymous.

The problem is with placing files in the default /var/ftp directory tree. Currently /var/ftp is owned by root:root, permissions drwxr-xr-x. The only way to move files into that directory at the moment is as root.

Obviously, we would like to be able to have regular users (i.e., with local accounts on this box) to be able to move files into this location, but we don't want to have to give them root access to do it.

I have been able to find scant little documentation on this aspect. What is the best way to set this up? Should I chown and chgrp /var/ftp to another user/group? What user/group should I use? What should the default permissions on /var/ftp be? What should the default permissions be on subdirectories within /var/ftp?

Thanks in advance for advice on this.

ferreter 02-19-2004 01:40 PM

chmod 666 /var/ftp
should give read/write (not excecute) perms. on the drive for regular users.

pioniere 02-19-2004 03:00 PM

Ah, thats the tricky part! If the directory is writable, vsftpd kicks back an error when you try to connect as a client:

Code:

Response:        500 OOPS: vsftpd: refusing to run with writable anonymous root
Error:        Unable to connect!


ferreter 02-19-2004 03:38 PM

hmm, then perhaps you will need to add an anyonymous group to the system, change the settings for vsftpd to allow that group write access, assign people which need write access to that group and chown the directory for that group. But let me ask you this, why can you not create an upload directory /var/ftp/upload (or something like that) and instead of working with the entire ftp directory just work with the isolated directory to reduce the chance of jazzing up the permissions or making things insecure?


All times are GMT -5. The time now is 08:27 PM.