Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 'at' symbol when using ls -l
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'at' symbol when using ls -l




On Nov 20, 2007, at 09:24:58, websrvr wrote:


On Nov 20, 2007, at 08:54:05, Michael Cashwell wrote:

On Nov 20, 2007, at 4:01 AM, Manfred Schwind wrote:

Leopard comes with svn installed in /usr/bin, that's great.
But I accidently deleted and tried to copy it back therein from another Leopard installation. It generally works, but I see something I want to know more about:


When I do the directory listing with "ls -l" of /usr/bin in the Terminal, I see an @ symbol behind the access rights:

-rwxr-xr-x@  1 root   wheel       251904 19 Nov 18:32 svn

What is that @ symbol standing for? It's not there on original Leopard installations. How can I get rid of that?

It indicates that the file has extended attributes. I don't know why xattr has no man page but give "xattr -h" a try.


If i copy svn e.g. to my home directory, the symbol is gone, but as soon as I copy it into /usr/bin it's there again.

I don't see this on any of my servers.

amavis-stats:libxml2 root# ls -l /usr/bin/
[ SNIP... ]
-rwxr-xr-x   1 root   wheel       251904 Sep 24 01:41 svn
[ SNIP... ]

I see how this occurred, further testing yields, "cp -rfp /Volumes/ MHD/usr/bin/svn /usr/bin/" doesn't have the same effect/result as using "(cd /Volumes/MHD/usr/bin/ && tar cfp - svn|(cd /usr/bin/ && tar fpvx -))" and dates are changed, "xattr -l /usr/bin/svn" showed nothing special so it must a system/kernel level integrity check.


my test:
cp -rfp /Volumes/MHD/usr/bin/svn /usr/bin/ && ls -l /usr/bin/svn; \
rm /usr/bin/svn; # delete the cp'd file just to be safe; \
(cd /Volumes/MHD/usr/bin/ && tar cfp - svn|(cd /usr/bin/ && tar fpvx -)) && ls -l /usr/bin/svn


displayed:
-rwxr-xr-x@  1 root   wheel       251904 Nov 20 09:22 svn
-rwxr-xr-x   1 root   wheel       251904 Sep 24 01:41 svn

Using tar seems to preserve everything (with "p" specified) where cp doesn't so I think you might want to start using tar or maybe ditto to copy system related files, also a good indication when someone else has changed files so you can keep an eye out for it now that you know what it means.



You can remove them by name via "xattr -d" though do exercise caution as they do contain information the system uses for ACLs and I think in the case you've found, the ability of the system to warn users that a binary is not trusted. Your copy operation strips the trust that the svn installed by the installer would otherwise have.


-Mike

-- Dale


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-userlevel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >'at' symbol when using ls -l (From: Manfred Schwind <email@hidden>)
 >Re: 'at' symbol when using ls -l (From: Michael Cashwell <email@hidden>)
 >Re: 'at' symbol when using ls -l (From: websrvr <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.