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.


[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
  • 1
    Is the user u1204 listed in /etc/sudoers file? You can see if it is, by looking for something like %user on around the 15th line of the file. – jobin Feb 16 '13 at 20:37
  • and if @jobin answer (iirc a user doing sudo gets an error notice?) is not the issue please do an ls -l on all of the parts of the directories and post the results. – Rinzwind Feb 16 '13 at 20:49
  • Never use sudo nautilus! If you really need a nautilus with root permissions use gksudo nautilus (and similar for all GUI applications)! – guntbert Feb 16 '13 at 21:59

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

Maybe an ACL is set. Use getfacl to find that out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.