← Back to team overview

lubuntu-desktop team mailing list archive

Re: Permissions and "who am i" (was: Possible bug? )

 

On 06/02/2011 07:54 PM, Jared Norris wrote:

> This is only a fairly recent occurrence or I would have picked up on
> it I would have thought. Does anyone have any suggestions on the best
> way to troubleshoot this sort of issue? I would simply log out and
> then back in but this is my main machine where I value my uptime so
> would prefer to leave that until last ditch effort.

Firstly, I think your description of the issue may be "upside-down".

If the commands run from the GUI were being run "as root", they would
more or less by definition be able to access any file owned by any user
anywhere on your machine (unless you have been doing some unusual things
with POSIX ACLs, or kernel capability bits, or both... which I rather
doubt!).

You asked for things to try to troubleshoot this further:

(1) In LXTerminal (assuming you can launch LXterminal OK), what does the
command

  id

output?  It should tell you who LXterminal thinks you are.  You can also try

  who am i

as another way to see who you are :)

(2) Next, check that your shell is clear about who you are, with

  echo $USER has a home at $HOME

and then check that the passwd file has you listed sanely, with

  grep $USER /etc/passwd

Then recheck the permissions on your home dir with

  ls -ld $HOME

You could also usefully check for files (or directories) in there which
are *not* owned by you, with

  find $HOME ! -user $USER -ls

which will output nothing at all on a 'normal' machine.

(3) Now, you need to find out who the various GUI components of LXDE are
running as, because it sounds to me as though they may be running as
someone else.

  ps aux |grep lx

should be a start on that.

(4) If you really want more homework after all that, just for fun, run
pcmanfm, but run it from the shell, not by pressing buttons anywhere
(hands off that mouse!) :

  pcmanfm &

Now check whether it can "see" your files (in $HOME and elsewhere)
normally, and can work with them, and also check who it is now running
as, just as a "you never know" check:

  ps aux |grep pcmanfm

OK, that's enough things to try for one email :)

Jonathan


References