Bug #1693

tmpfs/screen permission issue

Added by ftigeot over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Launching misc/screen(1) with tmpfs mounted on /tmp fails with a permission
error:

$ id
uid=1000(ftigeot) gid=20(staff) groups=20(staff), 0(wheel)

$ screen
You are not the owner of /tmp/screens/S-ftigeot.

$ ls -lad /tmp/screens/S-ftigeot
drwx------ 2 root wheel 0B Mar 13 12:45 /tmp/screens/S-ftigeot

The owner of /tmp/screens/S-ftigeot is incorrectly set to root.

With /tmp on a Hammer or UFS file system, /tmp/screens/S-$user ownership is set
to the user which launched screen(1) and its default group:

$ ls -lad /tmp/screens/S-ftigeot
drwx------ 1 ftigeot staff 0B Mar 13 12:52 /tmp/screens/S-ftigeot

This issue appeared on a system running DragonFly v2.5.1.945.ge3c80b-DEVELOPMENT
from March 12.

History

#1 Updated by pavalos over 4 years ago

Confirmed. It looks like chown() is failing for setuid programs.

#2 Updated by dillon about 4 years ago

I replaced tmpfs's chown permissions check code and that seems to fix the problem.

-Matt

Also available in: Atom PDF