Discussion:
ftpd in base
(too old to reply)
tech-lists
2018-05-20 11:49:00 UTC
Permalink
Hi,

context: 11.2-BETA2 #0 r333924/amd64

I'm trying to get chrooted ftpd (in base) to write files uploaded to the
user dir as mode 666 (umask 111). I have a line in inetd.conf that looks
like this:

ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l -u 111

The user logs in OK and uploads OK but the perms are always 644. There
is no login.conf overriding this. The users shell is /usr/sbin/nologin
as these are ftp-only accounts. This exact config works fine on linux
(specifically ubuntu)

Why is ftpd ignoring -u ? How can I fix?

thanks,
--
J
Eugene Grosbein
2018-05-20 17:35:34 UTC
Permalink
Post by tech-lists
Hi,
context: 11.2-BETA2 #0 r333924/amd64
I'm trying to get chrooted ftpd (in base) to write files uploaded to the user dir as mode 666 (umask 111).
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l -u 111
The user logs in OK and uploads OK but the perms are always 644. There is no login.conf overriding this.
By default, there IS login class "default" in our /etc/login.conf with 0644 umask value.
Post by tech-lists
The users shell is /usr/sbin/nologin as these are ftp-only accounts. This exact config works fine on linux (specifically ubuntu)
Why is ftpd ignoring -u ? How can I fix?
Our ftpd applies -u and by default instantly overrides it with login class setting.

You should add your own login class to /etc/login.conf with 0111 value
then run "cap_mkdb /etc/login.conf" and "pw usermod ftpusername -L ftploginclass"
tech-lists
2018-05-21 23:04:03 UTC
Permalink
Post by Eugene Grosbein
Our ftpd applies -u and by default instantly overrides it with login class setting.
You should add your own login class to /etc/login.conf with 0111 value
then run "cap_mkdb /etc/login.conf" and "pw usermod ftpusername -L ftploginclass"
Hi,

Thanks for this - have sorted it now.
--
J.
Loading...