Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
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. –  i08in 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

2 Answers 2

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

share|improve this 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 attributes from a file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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