Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Weird Terminal Thing

Weird Terminal Thing
Thread Tools
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jul 24, 2008, 05:31 PM
 
I've been using UNIX/Linux for a long time. I've recently come across something odd in the command line on OSX I don't understand. Look at this:

Code:
[dshaw@XeonQuad] whoami dshaw [dshaw@XeonQuad] ls -la drwxr-xr-x 14 dshaw dshaw 476 Jul 24 17:13 . drwxr--r-- 4 dshaw dshaw 136 Jul 24 17:13 .. -r-xr--r-- 1 dshaw dshaw 373 Jul 24 17:13 LDAPSearchPanel-compile -r-xr--r-- 1 dshaw dshaw 391 Jul 24 17:13 LDAPSearchPanel-shell -r--r--r-- 1 dshaw dshaw 3197 Jul 24 17:13 LDAPSearchPanel.launch [dshaw@XeonQuad] chmod 755 LDAPSearchPanel* chmod: LDAPSearchPanel-compile: Operation not permitted chmod: LDAPSearchPanel-shell: Operation not permitted chmod: LDAPSearchPanel.launch: Operation not permitted [dshaw@XeonQuad] sudo -s [root@XeonQuad] chmod 755 LDAPSearchPanel* chmod: LDAPSearchPanel-compile: Operation not permitted chmod: LDAPSearchPanel-shell: Operation not permitted chmod: LDAPSearchPanel.launch: Operation not permitted
What the heck is going on here? I can't change permissions on files I own -- and in fact can't even change them as root?

Along that line, look at the permissions on these files:
Code:
-rwxr--r--@ 1 dshaw dshaw 816 May 12 2004 jstest.html -rwxr--r--@ 1 dshaw wheel 183 Jun 9 2007 phpbb_get_admin.sql
What's with the "@" in the file list? I've seen "s" in that spot for setuid, but never "@", or "+" which I also see sometimes. Any help is appreciated.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Laurence
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Jul 24, 2008, 07:34 PM
 
I have no idea why you can't change the permissions on those files. I created files with the same names and was able to change the permisssions to 000 and then back to 777 with no issues.

The @ symbol means that there are extended atributes associated with the file. This metadata is usually spotlight comments entered in the Finder, however there could be other things that are in the flie.

Try an ls -la@ to get a list of what attributes are attached to the file.

See http://bottledtext.blogspot.com/2008...ttributes.html for more info.
--Laurence
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Jul 24, 2008, 09:00 PM
 
My first guess would be that the "uchg" flag got set somehow - if it is set, then that will keep even root from being able to chmod the file. The easiest way to check if the uchg flag is set is to Get Info on the file in the Finder and see if the "Locked" check box is checked, but if you want to use the Terminal, you can just use ls -laO instead of ls -la and see if "uchg" shows up in the description.

Other than that, it could be ACLs, I suppose. I'd check the uchg flag first though, as that's the simplest and thus the most likely culprit.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Arkham_c  (op)
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jul 24, 2008, 09:16 PM
 
Apparently uchg was the culprit. What a bizarre thing to have in the file system.

Thanks so much for your help.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Jul 25, 2008, 01:35 AM
 
Actually, there are very similar things in most filesystems, they just aren't used much in linux. The uchg flag can come in handy, and I have used it a few times.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not 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
Top
Privacy Policy
All times are GMT -4. The time now is 05:56 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,