WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Can I remount /dev/pts to have gid=5 option?

Open sunjoong opened this issue 9 years ago • 3 comments

I saw /dev/pts is mounted like this;

root@SUNJOONG-DESKTOP:~# mount
rootfs on / type lxfs (rw,noatime)
data on /data type lxfs (rw,noatime)
cache on /cache type lxfs (rw,noatime)
mnt on /mnt type lxfs (rw,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
C: on /mnt/c type drvfs (rw,noatime)
D: on /mnt/d type drvfs (rw,noatime)
F: on /mnt/f type drvfs (rw,noatime)
root on /root type lxfs (rw,noatime)
home on /home type lxfs (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noatime)
root@SUNJOONG-DESKTOP:~#

devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime)

I wanted to change it like this;

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

But, I saw this;

root@SUNJOONG-DESKTOP:~# mount -t devpts -o remount,gid=5,mode=620 devpts /dev/pts
mount: /dev/pts not mounted or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
root@SUNJOONG-DESKTOP:~# dmesg
dmesg: read kernel buffer failed: Function not implemented
root@SUNJOONG-DESKTOP:~#

Can I remount /dev/pts to have gid=5 option?

sunjoong avatar Apr 18 '17 21:04 sunjoong

Thanks for reporting the issue. WSL only currently support a few mount options, and it looks like the case you are hitting above is that WSL does not support mount options during remount. Also, WSL does not current support the gid mount option.

Is this blocking a particular scenario or just something you hit while using WSL?

stehufntdev avatar Apr 19 '17 16:04 stehufntdev

@stehufntdev - Thank you for comment. When I had compiled glibc, I had heard glibc need devpts with gid optionally if you want new suid. I know WSL does not be booted from REAL linux kernel, so had set it aside. And then while reading #482 , I noticed some user had used devpts with gid=5 in Jun 24 2016 comment, so was curious whether it is possible.

My questions are... Was it possible in old days? Is not possible these days? Will be possible in someday?

sunjoong avatar Apr 20 '17 12:04 sunjoong

This should be fixed in the Insider build 17017.

sunilmut avatar Oct 30 '17 18:10 sunilmut