lkml.org 
[lkml]   [2008]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: RFC: /dev/stdin, symlinks & permissions
Date
Michael Tokarev <mjt@tls.msk.ru> writes:

> # ls -l /dev/pts/0
> crw--w---- 1 root tty 136, 0 Mar 18 02:19 /dev/pts/0
>
> So far so good. Now, I change uid to something else, --
> doing su(8) to "mjt". /proc/self changed obviously,
> but stdin &Co is still here, and points to the same
> /dev/pts/0. But *its* permissions/ownership did not
> change! So now I can't, for example,
>
> $ echo x > /dev/stdout
> bash: /dev/stdout: Permission denied
>
> which is quite unexpected - I for one expect /dev/stdout
> to work the way very similar to /dev/tty, to mean "current
> standard output regardless of any permissions etc".

This has nothing to do with /dev/stdout. Your terminal simply does not
allow access by anyone except user root or group tty. You need to open
it up first, or mount /dev/pts with broader permissions (which is a bad
idea however).

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-03-18 00:57    [W:0.057 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site