An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
if anyone cares, root trash folder bug
#27130 10/21/13 07:04 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
since 10.6 I've noticed that with the root user logged into finger, trying to trash things tends to get you a "xxx will be deleted immediately" warning. Root trash doesn't seem to work. This mainly affected volumes formatted with disk utility while booted under 10.6. Some volumes that were migrated from 10.5 installations didn't have this issue.

I found the cause. For some reason, that version of os creates a /.Trashes/0 folder that is owned by "nobody". And the OS refuses to use it for trash.

so chown 0:0 /.Trashes/0 fixes it. It can affect external volumes in the same way. The fix is the same, change the owner of root's trash can to user id 0. You need to have permissions enabled to make that change stick, and the problem will affect volumes even while permissions are disabled. (which is kinda weird)


I work for the Department of Redundancy Department
Re: if anyone cares, root trash folder bug
Virtual1 #27133 10/21/13 09:15 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Why are you logging in as root?

The general rule is that anything with a GUI is too complicated to be safely run as the superuser. (It's OK for something with a GUI to use a helper tool that is suid root. The key point is that the helper tool does one simple thing, and it's easier to verify that it has no vulnerabilities.) Something as complex as Finder should never run with superuser powers.

Heck, I don't trust Finder to manage permissions correctly, even in a normal account. Finder's Get Info box is scary crazy. I always go to Terminal manage permissions, because it at least has sane, predictable behavior.

Anything you need superuser powers for you can do with sudo.

Yeah, yeah. I know. Apple's online help tells novice users how to "enable root" so they can log in as root, but I cringe every time I see that. It's a really bad idea, even for an advanced user like your or me.


Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.013s Queries: 18 (0.011s) Memory: 0.5712 MB (Peak: 0.6226 MB) Data Comp: Zlib Server Time: 2024-04-20 04:08:08 UTC
Valid HTML 5 and Valid CSS