remove directory `Private'

Asked by wolfv

How to remove an old "Private" directory? Here are some things I tried unsuccessfully:

wolf@copper:~/Documents$ ls
misc Private
wolf@copper:~/Documents$ rm Private -rf
rm: cannot remove directory `Private': Device or resource busy
wolf@copper:~/Documents$ $ sudo umount Private
$: command not found
wolf@copper:~/Documents$ umount Private
umount: /home/wolf/Documents/Private is not in the fstab (and you are not root)

I am running eCryptfs 7 on Ubuntu 10.4

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
eCryptfs Edit question
Assignee:
No assignee Edit question
Solved by:
Serge Hallyn
Solved:
Last query:
Last reply:
Revision history for this message
wolfv (wolf-volpi) said :
#1

wolf@copper:~$ ecryptfs-umount-private
Sessions still open, not unmounting

Revision history for this message
wolfv (wolf-volpi) said :
#2

wolf@copper:~/Documents$ rmdir Private
rmdir: failed to remove `Private': Device or resource busy

Revision history for this message
Best Serge Hallyn (serge-hallyn) said :
#3

On Sat, Jun 05, 2010 at 01:07:58AM -0000, wolfv wrote:
> Question #113520 on eCryptfs changed:
> https://answers.launchpad.net/ecryptfs/+question/113520
>
> wolfv gave more information on the question:
> wolf@copper:~/Documents$ rmdir Private
> rmdir: failed to remove `Private': Device or resource busy

A few notes:

1. you are trying to deleted ~/Documents/Private, is that really
what you want (rather than ~/Private).

2. if rmdir tells you something is in that directory, it's probably
right. Can you do an

       ls -laF ~/Documents/Private

to see what is actually in there?

3. to make sure nothing is mounted there, check

       cat /proc/mounts

4. you typed 'rm Private -rf'. That should be
       rm -rf Private
   But only if you're absolutely sure. Does it work in that order?

Revision history for this message
wolfv (wolf-volpi) said :
#4

Thanks Serge Hallyn, that solved my question.

Revision history for this message
wolfv (wolf-volpi) said :
#5

1. you are trying to deleted ~/Documents/Private, is that really
what you want (rather than ~/Private).
Yes

4. you typed 'rm Private -rf'. That should be
       rm -rf Private
   But only if you're absolutely sure. Does it work in that order?
That's what was causing the problem! Thanks for your help.

Revision history for this message
Ted_Smith (tedsmith28) said :
#6

This looks like you were just trying to delete a directory coinsidentally called 'Private' in your ~/Documents dir, as opposed to the actual eCryptfs mounted ~/Private dir.