|
|
Weird Terminal Thing
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
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 Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|