2

I have installed vsftp, and because I'm on Debian it automatically created the user ftp. I have set nopriv_user=ftp. Apart from that I haven't made any changes.

This ftp server is only going to allow anonymous logins, but I want several users on the Debian box to be able to move files into /srv/ftp.

/srv/ftp is owned by user root, and group ftp. So I figure the best solution would be to add every user who is to have write access to the ftp group.

Is this the normal/correct way of doing this?

Dave M
  • 4,514
  • 22
  • 31
  • 30
gomez
  • 21
  • 3
  • "Is this the normal/correct way of doing this?" i would say it is a right way – krisFR Dec 11 '13 at 01:08
  • Just out of interest, what are the other ways it can be done? The only other way I can think of is to set /srv/ftp to be world writable... – gomez Dec 11 '13 at 01:34
  • So i've missed something in your query...i was thinking that beeing a member of ftp group was working...if not, please improve your question and describe more precisely your problem. what is the output of "ls -ld /srv/ftp" ? – krisFR Dec 11 '13 at 01:37
  • Just tried it, and it's not working, the output is: drwxr-xr-x 2 root ftp 4096 Dec 11 00:51 /srv/ftp – gomez Dec 11 '13 at 01:45
  • Hang on I just realized I have to set the group permissions to write – gomez Dec 11 '13 at 01:46
  • Okay have added write permission for the group, but still not working: drwxrwxr-x 2 root ftp 4096 Dec 11 00:51 ftp – gomez Dec 11 '13 at 01:48
  • Try 777 for a few minutes, just to try... – krisFR Dec 11 '13 at 01:50
  • Yes, just set a+w and it works. Some more info: if I run "groups" the group ftp does not appear in the output. If I run "groups user" then the ftp group does appear. Does that mean the group doesn't exist and I have to create it? – gomez Dec 11 '13 at 01:52
  • Maybe, send the output for "cat /etc/group" – krisFR Dec 11 '13 at 01:53
  • Here is output of cat /etc/group | grep ftp: ftp:x:123:user I can post the rest if necessary... – gomez Dec 11 '13 at 01:55
  • You mean "a+w" or "o+w" ? now send "cat /etc/passwd | grep ftp" – krisFR Dec 11 '13 at 01:58
  • Okay, just discovered I can write to files but not create them... any ideas why that would be? [stand by for passwd output] – gomez Dec 11 '13 at 01:59
  • ftp:x:114:123:ftp daemon,,,:/srv/ftp:/bin/false – gomez Dec 11 '13 at 02:00
  • I just set a+w to test, I have since put it back to: drwxrwxr-x – gomez Dec 11 '13 at 02:03
  • Googled for being able to write to files but not create them, and I am going to try logging out and back in. Will report back... – gomez Dec 11 '13 at 02:06
  • Does this answer your question? [Refresh supplementary group memberships without logging in again?](https://serverfault.com/questions/74934/refresh-supplementary-group-memberships-without-logging-in-again) – tripleee Feb 10 '21 at 05:54

1 Answers1

0

Logging out and back in fixed it. I guess you need to do that for the group membership to fully take effect.

Wesley
  • 32,690
  • 9
  • 82
  • 117
gomez
  • 1