Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2024 23:51:57 -0700
From:      Daniel Li <dan@danielyli.com>
To:        freebsd-bugs@freebsd.org
Subject:   Possible bug: `adduser` not respecting home directory mode
Message-ID:  <CAHVT7hU4-cFR8_=aA-19BU9LmZXo0SrWR6ORWepY13%2BWaJ5WHw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000255dd9061c2a0912
Content-Type: text/plain; charset="UTF-8"

Hi there,

I noticed today that the home directory for a new user created via any of
these methods will always have permissions `rwxr-xr-x`:

1. `adduser -M 700`
2. `adduser`, and then manually specify `700` in interactive mode
3. Configure default mode via `adduser -C`, then execute the above #1 or #2

`adduser` seems to always ignore the specified mode. Is this a bug, or is
this user error?

freebsd-version -kru gives:
14.1-RELEASE
14.1-RELEASE
14.1-RELEASE-p1

Best,
Daniel Li

--000000000000255dd9061c2a0912
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail-gs" style=3D"margin:0px;min-width:0px;=
padding:0px 0px 20px;width:initial;font-family:&quot;Google Sans&quot;,Robo=
to,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div class=3D"g=
mail-"><div id=3D"gmail-:2e6" class=3D"gmail-ii gmail-gt" style=3D"directio=
n:ltr;margin:8px 0px 0px;padding:0px;font-size:0.875rem;overflow-x:hidden">=
<div id=3D"gmail-:2e5" class=3D"gmail-a3s gmail-aiL" style=3D"direction:ini=
tial;font-variant-numeric:normal;font-variant-east-asian:normal;font-varian=
t-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-str=
etch:normal;font-size:small;line-height:22.1px;font-family:Arial,Helvetica,=
sans-serif;overflow:auto hidden"><div dir=3D"ltr">Hi there,<div><br></div><=
div>I noticed today that the home directory for a new user created via any =
of these methods will always have permissions `rwxr-xr-x`:</div><div><br></=
div><div>1. `adduser -M 700`</div><div>2. `adduser`, and then manually spec=
ify `700` in interactive mode</div><div>3. Configure default mode via `addu=
ser -C`, then execute the above #1 or #2</div><div><br></div><div>`adduser`=
 seems to always ignore the specified mode. Is this a bug, or is this user =
error?</div><div><br></div><div>freebsd-version -kru gives:</div><div>14.1-=
RELEASE<br></div><div>14.1-RELEASE<br></div><div>14.1-RELEASE-p1<br></div><=
div><br></div><div>Best,</div><div>Daniel Li</div></div></div></div></div><=
/div></div>

--000000000000255dd9061c2a0912--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHVT7hU4-cFR8_=aA-19BU9LmZXo0SrWR6ORWepY13%2BWaJ5WHw>