mike wrote: ↑Mon Jan 30, 2017 4:08 am
This might happen if you've asked to NC to move folder to trash (*) and after a failure have tried to remove the entry completely(**).
(* which is basically a syscall for single entry, and it can't be routed into root-level service since I can't imagine what ~/Trash/ would mean for root user, so it is executed with current user's rights)
(** at this moment there's no re-scanning and recursive deleting of entries inside a directory after choosing to delete instead of moving to trash )
I can simply disable moving to trash when Admin Mode is toggled, this might solve an issue.
This was probably the reason. I recreacted the situation, and going directly for "delete permanently" instead of "move to trash" or hitting CMD-BACKSPACE was successful. BTW: I was not deleting system files, which you're right one shouldn't do, unless you've hacked a replacement copy, but a third-party .service that the developer wants to have installed in the Services directory of the global library, not the user library. So there are situations when users do need to delete files from the global or even the system library. (For example, a couple of weeks ago I hacked a macOS GPU kext in /System/Library/Extensions to alter some frame rate values etc.; while I may not be a "standard" macOS user, there are people like me around, who like to fumble with things.
)
"Move to trash" with root privileges could in principle move a file or folder to /private/var/root/.Trash … not in Finder, though… there it goes into the .Trash of the logged user, which is the standard user like admin. You'd have to switch into the actual root account (move on console), but that only works if you have that root user account enabled. (Most people don't even know it exists.) Then the Finder would surely put it in /private/var/root/.Trash. I don't know what would happen in NC, if the admin hasn't activated the root user account. Standard behavior should be that a file should be moved into the trash of the
logged user. So if a staff group user like admin elevates himself to root, but stays logged in as admin, then all root-privileged files should be moved to the .Trash directory of the user, not into /private/var/root/.Trash, for one thing because that directory (i.e. that root userspace) might not even exist, because it was never enabled.
So a good solution might be to leave "Move to Trash" even in admin mode, but always move the files/folders to the .Trash folder of the logged-in user, and completely ignore /private/var/root/.Trash,
unless the logged-in user is actually root. The latter would mean that if I actually
log in as root, not as admin, and then start Nimble Commander, "Move to Trash" should put files in /private/var/root/.Trash
JayB wrote: ↑Sun Jan 29, 2017 7:54 pm
Another (possible) bug I noticed a couple of weeks ago, is that Admin Mode is disabled after some time, which is a good thing (!), but the menu item Nimble Commander > Disable Admin Mode doesn't change back to "Enable Admin Mode". (At least that's what I noticed.)
This is quite odd, as there's no automatic disabling on Admin Mode.
Weird. Then it must be something that I did, and I didn't realize it. I'll try to recreate it, but I can't promise.
Come to think of it, wouldn't it be a security enhancement to add a timeout to the admin mode in Nimble Commander, similar to the timeout of sudo in the shell? You could even have a user setting in Preferences to set the time out: 15, 30, 45 minutes, 1/2/3/4 hours, and "forever" (i.e. until Quit).