Resolved Running verify disk in Disk Utility deletes my ~/.Trash directory.

Discussion in 'macOS' started by r0n1n, Jul 2, 2011.

  1. r0n1n, Jul 2, 2011
    Last edited: Jul 6, 2011

    r0n1n macrumors member

    r0n1n

    Joined:
    Sep 1, 2010
    Location:
    127.0.0.1
    #1
    Hello,

    Earlier this morning I ran a verify disk in disk utility (no errors.). Then shortly after, I tried to move some files to the trash, and I got a popup from Finder saying: "This item will be deleted immediately. You can’t undo this action."

    I did a ls -a in Terminal on my ~ directory, and there wasn't a /.Trash directory. So, I relaunched Finder, which created a new ~/.Trash directory.

    Then I ran another verify disk, and the same thing happened again with my ~/.Trash directory disappearing.

    I've rebooted and tried a repair permissions.

    I did noticed that this only happens when the trash is empty. If I put some files in the trash without emptying it, then run a verify disk, my ~/.Trash directory doesn't disappear.

    Dose anyone know what might be causing this? Thanks in advance. :)
     
  2. Jagardn macrumors 6502a

    Joined:
    Apr 18, 2011
    #2
    I tried everything you did and didn't have the problem.

    Enter this and see what you get...
    ls -al ~

    Your .Trash should look like this for permissions.
    drwx------ 6 jeff staff 204 Jul 2 17:41 .Trash

    if your permissions do not look like that enter the following command to change your permissions and try it again.

    sudo chmod 700 ~/.Trash

    it will ask for your user password

    That should fix it.
     
  3. r0n1n, Jul 2, 2011
    Last edited: Jul 2, 2011

    r0n1n thread starter macrumors member

    r0n1n

    Joined:
    Sep 1, 2010
    Location:
    127.0.0.1
    #3
    ls -al ~ shows:
    drwx------ 2 chris staff 68 Jul 2 13:05 .Trash

    I don't think its a permissions problem.
     
  4. Jagardn macrumors 6502a

    Joined:
    Apr 18, 2011
    #4
    What OSX version are you running?
    10.6.8 isn't giving me the same issue. :confused:
     
  5. r0n1n, Jul 2, 2011
    Last edited: Jul 2, 2011

    r0n1n thread starter macrumors member

    r0n1n

    Joined:
    Sep 1, 2010
    Location:
    127.0.0.1
    #5
    I'm running 10.6.8 build 10K540.

    I did install Little Snitch last night. That is the only application that I've installed in the past 7 days. I've uninstalled it, using the uninstaller on the .dmg. Rebooted, repaired permissions, then ran a verify disk, and after it was done verifying, my ~/.Trash disappeared. :confused:

    I guess Little Snitch isn't the cause. :(
     
  6. Jagardn macrumors 6502a

    Joined:
    Apr 18, 2011
    #6
    I'm pretty much at a loss on that one...sorry.:(
    Have you used any other disk tools in the past?
    I guess you could try moving your ~/Library/Preferences/com.apple.DiskUtility.plist to your desktop and running it again. Maybe something in there is corrupt, it should create a new one when you run it.
     
  7. r0n1n, Jul 2, 2011
    Last edited: Jul 2, 2011

    r0n1n thread starter macrumors member

    r0n1n

    Joined:
    Sep 1, 2010
    Location:
    127.0.0.1
    #7
    Regardless, thanks for helping me troubleshoot. :)
    Nope.
    Unfortunately, that didn't work, but I did notice some errors in the console (in my system.log):
    Code:
    Jul  2 21:51:10 Disk Utility[1053]: API_beginFilesystemVerifyForDisk
    Jul  2 21:51:10 mds[31]: (Error) LSOF: File '/private/var/run/utmpx' (fd=4) left open on device 234881026
    Jul  2 21:51:10 mds[31]: (Error) LSOF: File '/' (fd=7) left open on device 234881026
    Jul  2 21:51:10 mds[31]: (Error) LSOF: File '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Resources/tokruleLE.data' (fd=15) left open on device 234881026
    Jul  2 21:51:10 mds[31]: (Error) LSOF: File '/usr/share/germantok/german.index' (fd=20) left open on device 234881026
    Jul  2 21:51:10 mds[31]: (Error) LSOF: File '/usr/share/langid/langid.inv' (fd=26) left open on device 234881026
    Jul  2 21:51:56 diskmanagementd[1055]: APICALLBACK_dmAsyncFinishedForDisk_FSCK_result OK
    I know the first and last messages are normal, but the mds errors that happened at the same time disk utility starts verifying, seems a little odd.

    I also noticed that 10 seconds after I close disk utility, after running a verify disk, mds consumes 10-30% cpu usage for about 15 seconds. Maybe something is wrong with spotlight?
     
  8. Jagardn macrumors 6502a

    Joined:
    Apr 18, 2011
    #8
    My system log has the same errors, so It's probably normal. LSOF is "List of Open Files" the disk utility probably just gets an error code because they are in use by the OS.
     
  9. r0n1n, Jul 6, 2011
    Last edited: Jul 6, 2011

    r0n1n thread starter macrumors member

    r0n1n

    Joined:
    Sep 1, 2010
    Location:
    127.0.0.1
    #9
    After some more troubleshooting. I figured out how to stop that finder error, when I move anything to the trash after doing a verify disk, in disk utility.

    In my case, after running a verify disk, my ~/.Trash directory will disappear if it's empty. It still dose this, but when I was looking at activity monitor while disk utility was running a verify disk, I noticed two mdworker processes pop up after it was done verifying. I waited until the mdworker processes were done with whatever they were doing (probably indexing something for spotlight) and quits, I can then move anything to the trash without getting an error, and it will create a new ~/.Trash directory. :D

    I don't have a problem waiting a minute or two for mdworker to finish whatever it's doing, before moving something to the trash, but I still find it kind of odd that either disk utility or spotlight deletes my ~/.Trash directory if it's empty, after running a verify disk.

    Once again, thanks Jagardn, for helping me troubleshoot. :)
     
  10. Jagardn macrumors 6502a

    Joined:
    Apr 18, 2011
    #10
    No problem, I tried anyway. :)
     

Share This Page