[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jeabkwaou7.fsf@sykes.suse.de>
Date: Tue, 18 Mar 2008 00:54:40 +0100
From: Andreas Schwab <schwab@...e.de>
To: Michael Tokarev <mjt@....msk.ru>
Cc: Linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: RFC: /dev/stdin, symlinks & permissions
Michael Tokarev <mjt@....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@...e.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists