~/Library/ vs ~/System/Library vs /User/Library/

Posted: 07-11-2003, 09:28 PM
And there is a fourth one in ~/var/root/. I would like to understand in
which case does a system access or write to a certain Library?

Logical assumption would be that it depends on the current user, but
for instance some of the preferences or support files are written to a
~/Library regardless of which user is currently logged in.

I also noticed that if I register an app logged in as an user, I have a
problem running it as a root. This doesn't seem to be a permission
issue, rather a support files access problem. But then it sort of
"goes away" and I can't establish any consistent conclusiion why.

Is there a definite rule which Library acts as the "current" one and
which acts as a "global" ? And, since some files, plug ins, fonts etc
can be placed in either Library, which one is preferred and why?


Thanks,

J

Thanks,

j
Reply With Quote

Responses to "~/Library/ vs ~/System/Library vs /User/Library/"

Doug Brown
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-11-2003, 11:32 PM
In article <110720031327074895%justin.c@se.net>,
justin <justin.c@se.net> wrote:
> And there is a fourth one in ~/var/root/. I would like to understand in
> which case does a system access or write to a certain Library?
First off, you're a little bit confused. ~ means your home directory. So
the directories are /Library, /System/Library, ~/Library (which is
/Users/username/Library). The fourth one is just root's ~/Library.
> Logical assumption would be that it depends on the current user, but
> for instance some of the preferences or support files are written to a
> ~/Library regardless of which user is currently logged in.
Prefs that are written into /Library generally are supposed to be shared
between all users.
> I also noticed that if I register an app logged in as an user, I have a
> problem running it as a root. This doesn't seem to be a permission
> issue, rather a support files access problem. But then it sort of
> "goes away" and I can't establish any consistent conclusiion why.
I'm not sure why this is. Some installers will ask if you want to be
able to use it by all users, or just the current user. But most
installers don't.
> Is there a definite rule which Library acts as the "current" one and
> which acts as a "global" ? And, since some files, plug ins, fonts etc
> can be placed in either Library, which one is preferred and why?
Basically, here's how it goes. Items that are installed in /Library are
accessible by all users. Items installed in ~/Library
(/Users/username/Library) are only accessible to that user.
/System/Library is only for system purposes and should not be modified,
with one exception (the Extensions folder inside of it, which is where
kernel extensions are put).

All three are active at once. But since every different user has their
own ~/Library, only that user's ~/Library is active. Confusing, but do
you sort of understand? :-)

Doug

--
Doug Brown - La Grande, OR
Idiot's Guide to Mac Cases - http://www.ircandy.com/maccases/
If you want to reply by email, remove "pleasenospam." and ".invalid"
Reply With Quote
David J Richardson
Guest
Posts: n/a
 
Re: /System/Library vs /Library vs /Users/x/Library or /var/root/Library
Posted: 07-12-2003, 03:35 AM
In article <macg3-74D4EC.15325611072003@news.bellatlantic.net>,
Doug Brown <macg3@pleasenospam.mac.com.invalid> wrote:
> > I also noticed that if I register an app logged in as an user, I
> > have a problem running it as a root. This doesn't seem to be a
> > permission issue, rather a support files access problem. But then
> > it sort of "goes away" and I can't establish any consistent
> > conclusiion why.
root is just another user -- albeit a priveleged one on the permissions
front, and with its users folder hidden away. If you want a facility
for it, install to it (in which case the goodies go to
/var/root/Library), or in /Library, where all users can use it.

[subject corrected; placed in order from Apple-installed to
machine-specific to user-specific]

--
David J Richardson -- davidj@richardson.name
http://davidj.richardson.name/ -- Dr Who articles/interviews/reviews
http://www.boomerang.org.au/ -- Boomerang Association of Australia
Reply With Quote
Doug Brown
Guest
Posts: n/a
 
Re: /System/Library vs /Library vs /Users/x/Library or /var/root/Library
Posted: 07-12-2003, 03:55 AM
In article <davidj-B32408.12353212072003@freenews.iinet.net.au>,
David J Richardson <davidj@richardson.name> wrote:
> In article <macg3-74D4EC.15325611072003@news.bellatlantic.net>,
> Doug Brown <macg3@pleasenospam.mac.com.invalid> wrote:
>
> > > I also noticed that if I register an app logged in as an user, I
> > > have a problem running it as a root. This doesn't seem to be a
> > > permission issue, rather a support files access problem. But then
> > > it sort of "goes away" and I can't establish any consistent
> > > conclusiion why.
>
> root is just another user -- albeit a priveleged one on the permissions
> front, and with its users folder hidden away. If you want a facility
> for it, install to it (in which case the goodies go to
> /var/root/Library), or in /Library, where all users can use it.
>
> [subject corrected; placed in order from Apple-installed to
> machine-specific to user-specific]
Good idea to correct the subject

You may want to watch who you're quoting...I didn't say that; the OP
did. :-)

Doug

--
Doug Brown - La Grande, OR
Idiot's Guide to Mac Cases - http://www.ircandy.com/maccases/
If you want to reply by email, remove "pleasenospam." and ".invalid"
Reply With Quote
justin
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-12-2003, 05:25 AM
> First off, you're a little bit confused. ~ means your home directory. So
> the directories are /Library, /System/Library, ~/Library (which is
> /Users/username/Library). The fourth one is just root's ~/Library.
You are right, I have "misspelled" the paths with the tilde when I
actually meant the *root* - as in Mac HD or C:\ or .../ oh well.
Sorry about that, I do understand the difference.
>
> Basically, here's how it goes. Items that are installed in /Library are
> accessible by all users. Items installed in ~/Library
> (/Users/username/Library) are only accessible to that user.
Well, I would agree and I thought that is how it should work, but some
*global* preferences set while logged in as an user will not work when
logged in as a root. Or the other way around. Whatever the cause is, it
is frustrating.
I installed PGP a couple of months ago but I couldn't use it logged
as a root, I had to manually copy key files to the
/root/Library/Application support/PGP. Then I deleted all PGP files in
user/library/app suport to see what happens when looged in as an user -
and - it worked. ?
> All three are active at once. But since every different user has their
> own ~/Library, only that user's ~/Library is active.
> > Confusing, but do you sort of understand? :-)
Oh, I do. But because it all works in a "sort of" kinda way 2 weeks
ago I trashed /Users/* on this machine and I decided to stay
permanently logged in as a root by default. So far - no more headaches
and permission screw ups. Maybe Panther will act a bit more Mac-like.


j.
Reply With Quote
Simon Slavin
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-13-2003, 11:54 PM
In article <110720031327074895%justin.c@se.net>,
justin <justin.c@se.net> wrote:
>I also noticed that if I register an app logged in as an user, I have a
>problem running it as a root. [snip]
Don't run applications as root under OS X. It's not designed
for that. There's never a need to enable the root account for
an OS X installation.
>Is there a definite rule which Library acts as the "current" one and
>which acts as a "global" ? And, since some files, plug ins, fonts etc
>can be placed in either Library, which one is preferred and why?
It doesn't quite work like that. Think of it like this: for
any one account, everything from two library directories is
available: the global one and their own one. If you're putting
something on your system and you want everyone to be able to
use it, put it in under the root. If you want only yourself
to have access to it, put it in your home directory.

Now I distinguish between /System/Library and /Library: the
first one is for library routines used by the system: things
that the system itself needs to work. The second is used for
things that applications use -- not essential to keep the OS
working, useful for things that happen once the OS is running.


Reply With Quote
Steven Fisher
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-14-2003, 12:52 AM
Simon Slavin wrote:
> In article <110720031327074895%justin.c@se.net>,
> justin <justin.c@se.net> wrote:
>
>
>>I also noticed that if I register an app logged in as an user, I have a
>>problem running it as a root. [snip]
>
>
> Don't run applications as root under OS X. It's not designed
> for that. There's never a need to enable the root account for
> an OS X installation.
Unfortunately, that isn't really true. If you want to manipulate files
with full root privledges, you either need to learn the command line and
sudo or do it from the Finder by logging in to the GUI as root.
Hopefully, some day Apple will have the ability in the Finder to open a
folder as another user.

Reply With Quote
justin
Guest
Posts: n/a
 
Re: /System/Library vs /Library vs /Users/x/Library or /var/root/Library
Posted: 07-14-2003, 12:45 PM
In article <davidj-B32408.12353212072003@freenews.iinet.net.au>, David
J Richardson <davidj@richardson.name> wrote:
> In article <macg3-74D4EC.15325611072003@news.bellatlantic.net>,
> Doug Brown <macg3@pleasenospam.mac.com.invalid> wrote:
>
> > > I also noticed that if I register an app logged in as an user, I
> > > have a problem running it as a root. This doesn't seem to be a
> > > permission issue, rather a support files access problem. But then
> > > it sort of "goes away" and I can't establish any consistent
> > > conclusiion why.
>
> root is just another user -- albeit a priveleged one on the permissions
> front, and with its users folder hidden away. If you want a facility
> for it, install to it (in which case the goodies go to
> /var/root/Library), or in /Library, where all users can use it.
I guess I am seeing the problem from a different angle... Lets put it
this way: Which Library does an app prioritize to read its preferences
from, "global" or "user" ?

(For instance, I have BBedit prefs files in all three Libs plus
registration file in user/Library)

And - if I am logged in as an user (or root) but applications' files
were initially stored in /Library during installation - will they
(preferences) be recreated in the current user (or root) Library?
>
> [subject corrected; placed in order from Apple-installed to
> machine-specific to user-specific]
Thanks, that looks better. I made an idiot out of myself, didn't I.
But, wouldn't /System/Library be more machine-specific?

j.
Reply With Quote
Anno Siegel
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-14-2003, 02:55 PM
Doug Brown <macg3@pleasenospam.mac.com.invalid> wrote in comp.sys.mac.system:

[snip all to get to this:]
> /System/Library is only for system purposes and should not be modified,
> with one exception (the Extensions folder inside of it, which is where
> kernel extensions are put).
Going off on a tangent here...

Unfortunately, parts of the Perl library are also stored in /System/Library.
There are probably good reasons for this, but the consequence is that
Perl modules may want to write there during installation. This, in turn,
means that you have to be root for those installations. Admin privileges
are good enough for most installations, but not for these.

Anno
Reply With Quote
Simon Slavin
Guest
Posts: n/a
 
Re: ~/Library/ vs ~/System/Library vs /User/Library/
Posted: 07-17-2003, 12:42 AM
In article <fhmQa.425321$3C2.11599257@news3.calgary.shaw.ca >,
Steven Fisher <sdfisher@spamcop.net> wrote:
>Simon Slavin wrote:
>> There's never a need to enable the root account for
>> an OS X installation.
>
>Unfortunately, that isn't really true. If you want to manipulate files
>with full root privledges, you either need to learn the command line and
>sudo or do it from the Finder by logging in to the GUI as root.
>Hopefully, some day Apple will have the ability in the Finder to open a
>folder as another user.
'sudo' is fine. I have no problem with sudo. However, using the
GUI as root is not fine and can lead to problems. For instance,
imagine opening something in /dev in the Finder and having the
Finder try to make a .DS_Store file in it.


Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital Image Library 2006 - share library across multiple PCs? Jeff Price Windows XP Photos 6 09-06-2005 07:17 PM
Can't copy tracks from my wmp library to CD anymore...Can't burn from library. DJ needs serious help... dj donjuan Windows XP Music 1 06-03-2004 09:16 PM
loss of media library and unable to copy to library mat Windows XP Music 1 09-15-2003 07:12 PM
Microsoft Visual C++ Runtime Library Error only on user accounts Zachary Roth Windows XP Accessibility 0 08-31-2003 06:03 PM