Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On Fri, Dec 28, 2012 at 02:10:26PM +0800, William Kenworthy wrote On 28/12/12 11:25, Walter Dnes wrote: chmod 755 /dev/shm/hello /dev/shm/hello as a user (not root) wdk@moriah /home/vm/qemu/mail $ vi /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ chmod 755 /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ /dev/shm/hello Hello World wdk@moriah /home/vm/qemu/mail $ worked fine. and moriah ~ # mount|grep shm none on /dev/shm type tmpfs (rw,relatime) moriah ~ # Are you on regular udev? I thought that /dev/shm was supposed to be noexec as a security measure. -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
Walter Dnes wrote: On Fri, Dec 28, 2012 at 02:10:26PM +0800, William Kenworthy wrote On 28/12/12 11:25, Walter Dnes wrote: chmod 755 /dev/shm/hello /dev/shm/hello as a user (not root) wdk@moriah /home/vm/qemu/mail $ vi /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ chmod 755 /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ /dev/shm/hello Hello World wdk@moriah /home/vm/qemu/mail $ worked fine. and moriah ~ # mount|grep shm none on /dev/shm type tmpfs (rw,relatime) moriah ~ # Are you on regular udev? I thought that /dev/shm was supposed to be noexec as a security measure. Here is some info on mine, while you are waiting on William. root@fireball / # ls -al /dev/shm total 4 drwxrwxrwt 2 root root60 Dec 3 18:20 . drwxr-xr-x 17 root root 4360 Dec 28 15:30 .. -rwxr-xr-x 1 dale users 32 Dec 3 18:20 sem.lastpassffsemaphore root@fireball / # equery list udev * Searching for udev ... [IP-] [ ] sys-fs/udev-171-r9:0 root@fireball / # Does that help any? If I read that correctly, it is executable. At least it is for the one that is there. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On 29/12/12 08:17, Walter Dnes wrote: On Fri, Dec 28, 2012 at 02:10:26PM +0800, William Kenworthy wrote On 28/12/12 11:25, Walter Dnes wrote: chmod 755 /dev/shm/hello /dev/shm/hello as a user (not root) wdk@moriah /home/vm/qemu/mail $ vi /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ chmod 755 /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ /dev/shm/hello Hello World wdk@moriah /home/vm/qemu/mail $ worked fine. and moriah ~ # mount|grep shm none on /dev/shm type tmpfs (rw,relatime) moriah ~ # Are you on regular udev? I thought that /dev/shm was supposed to be noexec as a security measure. * sys-fs/udev Latest version available: 196-r1 Latest version installed: 196-r1 Size of downloaded files: 1,922 kB Homepage:http://www.freedesktop.org/wiki/Software/systemd Description: Linux dynamic and persistent device naming support (aka userspace devfs) License: LGPL-2.1 MIT GPL-2 * sys-fs/udev-init-scripts Latest version available: 18 Latest version installed: 18 Size of downloaded files: 4 kB Homepage:http://www.gentoo.org Description: udev startup scripts for openrc License: GPL-2 * virtual/udev Latest version available: 196 Latest version installed: 196 Size of downloaded files: 0 kB Homepage: Description: Virtual for udev implementation and number of its features License: I am waiting on eudev so I can dump it, but I also recently found udevil and am wondering if anyone can overview it and compare with eudev ... is it a similar project, or just for user mounting? BillK
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On Sat, Dec 29, 2012 at 09:35:03AM +0800, William Kenworthy wrote: * sys-fs/udev Latest version available: 196-r1 Latest version installed: 196-r1 Size of downloaded files: 1,922 kB Homepage:http://www.freedesktop.org/wiki/Software/systemd Description: Linux dynamic and persistent device naming support (aka userspace devfs) License: LGPL-2.1 MIT GPL-2 * sys-fs/udev-init-scripts Latest version available: 18 Latest version installed: 18 Size of downloaded files: 4 kB Homepage:http://www.gentoo.org Description: udev startup scripts for openrc License: GPL-2 * virtual/udev Latest version available: 196 Latest version installed: 196 Size of downloaded files: 0 kB Homepage: Description: Virtual for udev implementation and number of its features License: I am waiting on eudev so I can dump it, but I also recently found udevil and am wondering if anyone can overview it and compare with eudev ... is it a similar project, or just for user mounting? BillK Go for it! mingdao@workstation ~/dwhelper $ eshowkw eudev Keywords for sys-fs/eudev: | | u | | a a p s | n | | l m h i m m p s p | u s | r | p d a p a 6 i p c 3 a x | s l | e | h 6 r p 6 8 p p 6 9 s r 8 | e o | p | a 4 m a 4 k s c 4 0 h c 6 | d t | o ---+---+-+--- 0| + + + + + + ~ + + + + + + | o 0 | gentoo 0-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo 1_beta1-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o | gentoo | o o o o o o o o o o o o o | o | gentoo -- Happy Penguin Computers ') 126 Fenco Drive ( \ Tupelo, MS 38801 ^^ supp...@happypenguincomputers.com 662-269-2706 662-205-6424 http://happypenguincomputers.com/ Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On Fri, Dec 28, 2012 at 07:23:33PM -0600, Dale wrote Here is some info on mine, while you are waiting on William. root@fireball / # ls -al /dev/shm total 4 drwxrwxrwt 2 root root60 Dec 3 18:20 . drwxr-xr-x 17 root root 4360 Dec 28 15:30 .. -rwxr-xr-x 1 dale users 32 Dec 3 18:20 sem.lastpassffsemaphore root@fireball / # equery list udev * Searching for udev ... [IP-] [ ] sys-fs/udev-171-r9:0 root@fireball / # Does that help any? If I read that correctly, it is executable. At least it is for the one that is there. Can you create the sample script on /dev/shm, chmod it 755, and try to run it. The noexec mount option over-rides attributes that chmod sets. E.g. on my machine... [d531][waltdnes][~] chmod 744 /dev/shm/hw [d531][waltdnes][~] ll /dev/shm/hw -rwxr--r-- 1 waltdnes users 32 Dec 27 19:10 /dev/shm/hw [d531][waltdnes][~] /dev/shm/hw bash: /dev/shm/hw: Permission denied [d531][waltdnes][~] -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
Walter Dnes wrote: On Fri, Dec 28, 2012 at 07:23:33PM -0600, Dale wrote Here is some info on mine, while you are waiting on William. root@fireball / # ls -al /dev/shm total 4 drwxrwxrwt 2 root root60 Dec 3 18:20 . drwxr-xr-x 17 root root 4360 Dec 28 15:30 .. -rwxr-xr-x 1 dale users 32 Dec 3 18:20 sem.lastpassffsemaphore root@fireball / # equery list udev * Searching for udev ... [IP-] [ ] sys-fs/udev-171-r9:0 root@fireball / # Does that help any? If I read that correctly, it is executable. At least it is for the one that is there. Can you create the sample script on /dev/shm, chmod it 755, and try to run it. The noexec mount option over-rides attributes that chmod sets. E.g. on my machine... [d531][waltdnes][~] chmod 744 /dev/shm/hw [d531][waltdnes][~] ll /dev/shm/hw -rwxr--r-- 1 waltdnes users 32 Dec 27 19:10 /dev/shm/hw [d531][waltdnes][~] /dev/shm/hw bash: /dev/shm/hw: Permission denied [d531][waltdnes][~] Mine does this: root@fireball / # chmod 755 /dev/shm/hello root@fireball / # /dev/shm/hello -su: /dev/shm/hello: Permission denied root@fireball / # ls -al /dev/shm/hello -rwxr-xr-x 1 root root 31 Dec 28 23:08 /dev/shm/hello root@fireball / # cat /etc/fstab | grep shm # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory (shm_open, shm_unlink). shm /dev/shmtmpfs nodev,nosuid,noexec 0 0 root@fireball / # So I get permission denied too. I did that as root to I might add in case you don't notice. That help? Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On Thu, Dec 27, 2012 at 01:49:01PM +0800, William Kenworthy wrote Do you have the fstab line: none /dev/shm tmpfs defaults 0 0 I had an ancient version, which I've been copying to new installs for years. It was... shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 I changed over to your line, and rebooted, but no difference. I finally did things the hard way in fstab... none /dev/shmtmpfs rw,noatime,noexec,nosuid,nodev 0 0 ...and in /etc/local.d/000.start I've added a chmod line... #!/bin/bash mount devpts chmod 1777 /dev/shm Note that on my system, defaults in fstab allows scripts to execute on /dev/shm, which is generally frowned on. noexec blocks that, notwithstanding the chmod 1777. Out of sheer curiousity, what happens when you create file /dev/shm/hello with 2 lines... #!/bin/bash echo Hello World ...and then you chmod 755 /dev/shm/hello /dev/shm/hello Does it execute or come back with permission denied? -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On 28/12/12 11:25, Walter Dnes wrote: chmod 755 /dev/shm/hello /dev/shm/hello as a user (not root) wdk@moriah /home/vm/qemu/mail $ vi /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ chmod 755 /dev/shm/hello wdk@moriah /home/vm/qemu/mail $ /dev/shm/hello Hello World wdk@moriah /home/vm/qemu/mail $ worked fine. and moriah ~ # mount|grep shm none on /dev/shm type tmpfs (rw,relatime) moriah ~ # BillK
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On Thu, Dec 27, 2012 at 10:25 PM, Walter Dnes waltd...@waltdnes.org wrote: On Thu, Dec 27, 2012 at 01:49:01PM +0800, William Kenworthy wrote Do you have the fstab line: none /dev/shm tmpfs defaults 0 0 I had an ancient version, which I've been copying to new installs for years. It was... shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 I changed over to your line, and rebooted, but no difference. I finally did things the hard way in fstab... Have you somehow disabled the localmount service? That fstab line should work fine.
[gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
This may be related to me running mdev instead of udev. I've been using /dev/shm for creating and deleting scratch files, to speed things up when processing photographs with automated scripts. It used to work. But now it no longer allows writes by anybody except root. A couple of days ago, I did a big update, which resulted in devpts having to be explicitly mounted. Since I run mdev instead of udev, the instruction to rc-update add udev-mount sysinit doesn't work for me. Instead I put an explicit mount devpts in /etc/local.d/000.start, which handles the automounting. Anybody else seeing /dev/shm as root-only, or is this an artifact of my weird setup? -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
Walter Dnes wrote: This may be related to me running mdev instead of udev. I've been using /dev/shm for creating and deleting scratch files, to speed things up when processing photographs with automated scripts. It used to work. But now it no longer allows writes by anybody except root. A couple of days ago, I did a big update, which resulted in devpts having to be explicitly mounted. Since I run mdev instead of udev, the instruction to rc-update add udev-mount sysinit doesn't work for me. Instead I put an explicit mount devpts in /etc/local.d/000.start, which handles the automounting. Anybody else seeing /dev/shm as root-only, or is this an artifact of my weird setup? I'm not real sure on what you are doing but, this is what mine is: root@fireball / # ls -al /dev/shm total 4 drwxrwxrwt 2 root root60 Dec 3 18:20 . drwxr-xr-x 18 root root 4400 Dec 26 18:56 .. -rwxr-xr-x 1 dale users 32 Dec 3 18:20 sem.lastpassffsemaphore root@fireball / # It seems that whatever file is there is owned by the person who created it. I use LastPass for my password manager so, I assume, that is what that is. Odd tho that I am not currently logged into LastPast but can't imagine what else could be named that. That help any? Can I get you any other info? Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
Re: [gentoo-user] /dev/shm permissions drwxr-xr-x root:root ?
On 27/12/12 11:19, Dale wrote: Walter Dnes wrote: This may be related to me running mdev instead of udev. I've been using /dev/shm for creating and deleting scratch files, to speed things up when processing photographs with automated scripts. It used to work. But now it no longer allows writes by anybody except root. A couple of days ago, I did a big update, which resulted in devpts having to be explicitly mounted. Since I run mdev instead of udev, the instruction to rc-update add udev-mount sysinit doesn't work for me. Instead I put an explicit mount devpts in /etc/local.d/000.start, which handles the automounting. Anybody else seeing /dev/shm as root-only, or is this an artifact of my weird setup? I'm not real sure on what you are doing but, this is what mine is: root@fireball / # ls -al /dev/shm total 4 drwxrwxrwt 2 root root60 Dec 3 18:20 . drwxr-xr-x 18 root root 4400 Dec 26 18:56 .. -rwxr-xr-x 1 dale users 32 Dec 3 18:20 sem.lastpassffsemaphore root@fireball / # It seems that whatever file is there is owned by the person who created it. I use LastPass for my password manager so, I assume, that is what that is. Odd tho that I am not currently logged into LastPast but can't imagine what else could be named that. That help any? Can I get you any other info? Dale :-) :-) moriah ~ # ls -al /dev/shm total 128 drwxrwxrwt 2 root root 80 Dec 27 13:39 . drwxr-xr-x 17 root root 4900 Dec 27 12:51 .. -r 1 wdk wdk 67108904 Dec 27 13:39 pulse-shm-259503987 -r 1 wdk wdk 67108904 Dec 27 13:39 pulse-shm-3719994179 moriah Do you have the fstab line: none /dev/shm tmpfs defaults 0 0 I also grepped /usr/lib/udev/* and no shm shows in the udev rules there. The contents of the dir are as Dale sees - I have a couple of BillK