why do we need to repair permissions...
and how come they get "ruined" in the first place?
Before I get flamed - I read the sticky note "FAQ: Check here first if you have problems!" and I know how to use Disk Utility, but I was curious to know how and why permissions become corrupted or changed in the first place. I mean, I don't think I am conscioulsy changing them - what gives?
Thanks in advance.
Before I get flamed - I read the sticky note "FAQ: Check here first if you have problems!" and I know how to use Disk Utility, but I was curious to know how and why permissions become corrupted or changed in the first place. I mean, I don't think I am conscioulsy changing them - what gives?
Thanks in advance.
Comments
1. Careless/idiot users who change permissions without knowing what they are.
2. Careless/idiot developers who distribute software in the .pkg installer format and accidentally change permissions.
That about covers everything.
Permissions don't just spontaneously change themselves. At least, I've never witnessed it.
But I'm not sure I get this completely.
When I repair permissions, the computer fixes up files that don't match with my settings of "what" exactly?
I understand the UNIX levels of Owner/Group/World and the rwx (read/write/execute) capabilities for each level... I just don't understand how the computer knows what each file's permissions "should be" in the first place! What is it comparing each file to? How does it know what to "repair" each file to?
On my computer, when I do a repair permissions routine, I guess I can presume that my original files are all OK (if I haven't changed them myself) and that it must be new files as they are extrapolated out of a .pkg bundle when new software is installed that need their permissions repaired. Can you give me an example of how these files from the .pkg bundle need to be "repaired" so that they work more efficiently on my system please? In other words - what is an example of a careless/idiot developer file that needs to have its premissions repaired?
... AND, how does repairing permissions affect system performance exactly? Wouldn't it just mean that for some users they just don't have permission to read/write/execute a file? That doesn't seem to me to be something that would slow a system down, would it?
Thanks again.
Escher
restart after update, and suddenly lots of things "unexpectedly quit" on startup because the expectation of finding a file didn't match up with what was actually there. these permissions are validated back against the packages that mac os x leaves behind after an install. this is why mac home journal got in hip-deep poo-poo for recommending that users save disk space by deleting the contents of the packages directory. voila! disk utility failed when trying to repair permissions, because it didn't know what they were supposed to be in the first place.
i'm sure others can let me know if i am totally off-track on this or not.
what i would like to know is if there is a free utility that will automatically repair permissions on a timed schedule (like 3 a.m., when i'm not here) so i don't have to do it manually.
Originally posted by rok
well, one minor example of erroneous permission settings ...
... i'm sure others can let me know if i am totally off-track on this or not.
i appreciated your posting pretty much. Now i've got a good grasp of how "bad permissions settings" affect (or infect?) system state. I wasn't aware of that kind of complexity yet.
That was a good rok powwow, really.
best
I can?t say that I understand all of this, but at least it worked.
Is there an equivalent to this stuff on the Windows side of things? Maybe having to do with the registry?
Originally posted by CosmoNut
Is there an equivalent to this stuff on the Windows side of things? Maybe having to do with the registry?
yeah, its called "reinstall the OS every 4 months" because so much shit gets crapped out, mis-installed, spyware, viruses, corrupt registried, etc...
I went without re-installing ANYTHING from 10.1 to 10.2 to 10.3... just the incremental updates as Apple would deliver em.
I dare any Windows user to do that AND have a stable system a few years later.
A good fiend of mine, software engineer for a major computer company, takes it as totally normal to totally wipe and reinstall Windows once every few months... its just "normal" for him.
Then they call it a stable platform
Aaaaaanyway... yeah, I totally agree. 7-8-9 had desktop rebuild and I was a Norton Disk Optimize addict (once a month... I loved seeing my drive result as a nice rainbow ). In X its emptying the caches and repairing permissions... Disk Optimization has become a once a year thing for me. Maybe I've been lucky and should do it mor eoften... but with 8 various HDs and minor problems at best... I fairly trust HFS+ Journaled so far...
Originally posted by Mac+
When I repair permissions, the computer fixes up files that don't match with my settings of "what" exactly?
When you install a package using the Apple Installer application, a Receipt is made in /Library/Receipts. If you go peek inside one of those .pkg files, you'll see the Archive.bom file, which lists all the files that were created and/or updated by the installer, *and* the correct permissions for each.
Repair Permissions scans these Receipts, and finds the last permissions stamp for each installed file, makes a big list, and then checks it against what's on the disk. If something doesn't match, it makes it.
Originally posted by Kickaha
When you install a package using the Apple Installer application, a Receipt is made in /Library/Receipts. If you go peek inside one of those .pkg files, you'll see the Archive.bom file, which lists all the files that were created and/or updated by the installer, *and* the correct permissions for each.
Repair Permissions scans these Receipts, and finds the last permissions stamp for each installed file, makes a big list, and then checks it against what's on the disk. If something doesn't match, it makes it.
Kickaha - YOU ROCK!! Thank-you!
Originally posted by rok
well, one minor example of erroneous permission settings causing problems would be an installer (and trust me, unless you are anal-retentive out the wazoo, you install things way more often than you think) setting permissions incorrectly on a file that a file (say, a system update) NEEDS to edit in order to complete a correct install. this is why some people who do not repair permissions before installing a system update occasionally get wonky results. ...[snip]...
restart after update, and suddenly lots of things "unexpectedly quit" on startup because the expectation of finding a file didn't match up with what was actually there. these permissions are validated back against the packages that mac os x leaves behind after an install. ...[snip]...
what i would like to know is if there is a free utility that will automatically repair permissions on a timed schedule (like 3 a.m., when i'm not here) so i don't have to do it manually.
Thanks rok - helpful post... I don't know of any automated repair permissions utility. Sorry.
Originally posted by Chinney
I seemed to have screwed up permissions when I transferred a large folder of files (essentially just end-user .doc and .ppt files) from one of the defined users on my machine to the other. I could open the files under the new user, but I could not save them. I changed the permissions to the folder manually under File > Get Info (including the check to apply to all files under the folder), but this did not help. Based on a suggestion I had seen on AI, I ran repair permissions. This worked. I still had to manually change the permission to the folder after I ran the repair, but at least this time the manual change was effective to give me full rights to the folder, including the right to save.
I can?t say that I understand all of this, but at least it worked.
Chinney - this is a classic example of what I'm talking about. How do we (the end users) seemingly screw up permissions by just copying files from one computer (or other user's directory) to our home directory? I presume the other user had set the files to be readable by the group/world categories, but not writeable (hence being unable to save). In this case, trying to change the permissions via Get Info seems to be a normal thing to do, but the computer won't allow it! How come?
Then runnng repair permissions must check against what? (Kickaha tells us of a check between a receipt system and the archive.bom files from a .pkg installer - but in your case, we are talking about a transfer of files.) What can repair permission compare these files to in this case?
AND, furthermore, why can't we change permissions via the Get Info box? What's the point of only being able to observe what the permission are if you are unable to alter them (presuming you have the authority)?
Thanks again, wise ai'ers!
As stated from memory, and could be completely wrong
Also does "less is more" in your sig come from Hank?
Originally posted by jwri004
The name MacJanitor springs to mind, but this only from memory, and not from use.
As stated from memory, and could be completely wrong
Also does "less is more" in your sig come from Hank?
I've got Macjanitor and thought about mentioning it too, but I don't think you can automate it (well I haven't worked out how to anyway ) - you have to manually trigger it to run. I'm also not sure it does the repair permissions thing... here is a copy of what it says it does:
About the system maintenance scripts
What in the world is it doing when it's churning away at my hard drive running the maintenance scripts?
Here's a brief translation of the /etc/daily,weekly, and monthly scripts into English (although I wouldn't call it 'plain English'...).
Daily Script
If the rwho system has been configured, clear out the old files in /var/rwho
Clear out files old files and directories in the /tmp and /var/tmp directories
Remove system messages older than 21 days
If system accounting is on, process the accounting files and gather daily statistics
Backup the NetInfo database
Output the disk capacities and storage available
Show which filesystems haven't had 'dump' performed on them in a while (archaic)
Show accumulated network statistics and network uptime (ruptime)
Rotate the system.log file and restart the syslog process
Clear out the webserver log files older than a week
Run the /etc/daily.local script if it exists
Run a /etc/security check script if it exists
Weekly Script
If the /usr/libexec/locate.updatedb database exists, update the 'locate' database
If the /usr/libexec/makewhatis.local file exists, rebuilt the 'whatis' database
Rotate the following log files: ftp.log, lookupd.log, lpr.log, mail.log, netinfo.log
Restart the syslog process
Run the /etc/weekly.local script if it exists
Monthly Script
Run the login accounting process
Rotate the wtmp log files
Restart the syslog daemon
Run the /etc/monthly.local script if it exists
btw - who/what is Hank?
"less is more" - is a saying I use when I try to teach my students about improvisation ... in fact, I'm sure it can also be applied to writing (see Strunk & White) and perhaps creating code - but I have trouble adhering to that philosophy in those areas sometimes. I hope that explanation wasn't too loquacious!
Hank = Henry Rollins.
Does a routine called Dehumanized where he uses that statement. More to do with putting up with adversity, and using it to become a better "human"
[\\off topic]