"Mac has many enhancements to Unix in the area of files. Ignoring the whole resource fork thing which is not used much anymore, there are:
- the standard Unix permissions ugo rwx and so on. Normal Unix tools apply.
- ACLs, viewable with
ls -le
and changeable with chmod [ -a | +a | =a ]
.
- file flags viewable with
ls -lO
and changeable with chflags
.
- extended attributes, viewable with
ls -l@
(attribute keys only) and changeable with xattr
. (Note that there is no man page for xattr
, but it's a simple program described with xattr -h
.)
You can be denied operations on a file because of Unix permissions, ACLs or file flags.
To fully unlock a file:
sudo chmod -N ugo+rw somefile # Remove ACLs and set allow everyone read-write permission
sudo chflags nouchg somefile
Note that if ls -lO
shows that the schg
flag is set, you have to get into single-user mode to unset it. I'm not going to get into that here as there are bigger questions about why the file has that flag set and why you are trying to mess with it and what the consequences will be."
Recent comments
2 years 32 weeks ago
4 years 2 weeks ago
4 years 2 weeks ago
4 years 4 weeks ago
4 years 5 weeks ago
4 years 11 weeks ago
4 years 11 weeks ago
4 years 12 weeks ago
4 years 12 weeks ago
4 years 12 weeks ago