Ubuntu – “sudo rm” fails to delete files

12.04rmsudo

My main account is called "u1204" and I have some files created with another account called "dad":

$ find . -user dad -print
./Documents/Zim Notes/.zim/state.conf
./Documents/Zim Notes (DAD)/.zim/state.conf
[...others omitted...]

$ ls -l "./Documents/Zim Notes/.zim/state.conf"
-rw-rw-r-- 1 dad dad 4407 Feb 13 23:33 ./Documents/Zim Notes/.zim/state.conf

$ sudo rm "./Documents/Zim Notes/.zim/state.conf"
[sudo] password for u1204: 
rm: cannot remove `./Documents/Zim Notes/.zim/state.conf': Permission denied

Using "sudo nautilus" is no more successful.

I thought that a super user could delete anything?

I could delete them from the other account but I'd like to understand what's going on.

Thanks.

[EDIT]
Additional information as requested in comments:
/etc/sudoers

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

In "user accounts" both accounts are identified as "Adminstrator"; sudo generally works; both accounts belong to group "u-glob"

$ ls -la "./Documents/Zim Notes/.zim/"
total 44
drwxrwx--x 2 u1204 u-glob  4096 Feb 13 23:37 .
drwxrwx--x 9 u1204 u-glob  4096 Jan 31 12:10 ..
-rwxrwx--x 1 u1204 u-glob 25600 Feb 13 23:37 index.db
-rw-rw-r-- 1 dad   dad     4407 Feb 13 23:33 state.conf

Best Answer

The file might have some attributes blocking the deletion, like the immutable attribute that disables deletion even for root.
To check attributes use: lsattr your_file It should be only dashes next to the file like this:

--------------- your_file

The immutable attributes shows like this:

----i---------- your_file

You can use chattr as root to remove this attribute from a file:

chattr -i your_file
Related Question