Mailinglist Archive: opensuse (4634 mails)

< Previous Next >
Re: [opensuse] difference su <-> login?
  • From: Peder <suseuser@xxxxxxxxxxx>
  • Date: Fri, 15 Dec 2006 14:19:56 +0100 (CET)
  • Message-id: <Pine.LNX.4.64.0612151407170.26530@xxxxxxxxxxxxxxxxx>


On Fri, 15 Dec 2006, Daniel Bauer wrote:

Hi,

what is the difference when I start an app from console when I'm logged in as
the user, or when I start it from the console as another user after "su -l
username"?

Sorry for my poor english, let me explain:

I have 2 users: "daniel" and "digi". Usually I work as "daniel", but I have a
svn-test-version of digikam installed as user "digi" to keep it apart from my
production environment.

When I'm logged in as "daniel" I open a console and type "su -l digi" and
after the pwd I start digikam. But in digikam I cannot save a changed photo
(overwrite a file). There is no problem writing a *new* file, but overwriting
an existing one is not possible.

Hmmm, weird. "su -l user" or just "su - user" should take you to that
users home directory (just "su user" will change user but not current
directory). I guess daniels home directory is somehow writable by digi
but files created and owned by daniel aren't.
Do a "ls -lad $HOME" as daniel and see if the rights are drwxrwxr-x.
If so you have a possible security risk (if you have other users
on your computer) and you should do a "chmod 700 $HOME" (or 755 or 744).
Also do a "pwd" after you su and see what directory you're in.

Depending on how you want it you can either put daniel and digi in the
same user group and make sure the files are writable by that group, or
make sure that when you su to digi you end up in that users home
directory (usually /home/digi).

- Peder
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References