I copied some files from a data DVD to /home/emma
(ext4), and all of the files are read only.
This is what all of the files are like:
emma@emma-W54-55SU1-SUW:~$ stat cd/Drivers/Drivers_List.rtf
File: ‘cd/Drivers/Drivers_List.rtf’
Size: 28120 Blocks: 56 IO Block: 4096 regular file
Device: 801h/2049d Inode: 656521 Links: 1
Access: (0400/-r--------) Uid: ( 1000/ emma) Gid: ( 1000/ emma)
Access: 2014-01-17 05:34:46.000000000 +0000
Modify: 2014-01-17 05:34:46.000000000 +0000
Change: 2015-02-01 23:11:04.226865424 +0000
Birth: -
When I try to delete them, I get rm: cannot remove ‘cd/Drivers/Drivers_List.rtf’: Permission denied
, even though I'm the owner. Changing the mode to 777
doesn't work either. The only thing that works is deleting them as root, using sudo
.
I thought only an i
attribute made files unable to be deleted by their owner, so what's going on?
I'm using Xubuntu 14.10.
Results of various commands:
(Please note: I created directory cd
myself, and then copied directory Drivers
to it from the DVD.)
emma@emma-W54-55SU1-SUW:~$ ls -dlh cd
drwxrwxr-x 3 emma emma 4.0K Feb 3 01:44 cd
emma@emma-W54-55SU1-SUW:~$ ls -dlh cd/Drivers
dr-x------ 11 emma emma 4.0K Feb 3 02:15 cd/Drivers
emma@emma-W54-55SU1-SUW:~$ ls -l cd/Drivers/Drivers_List.rtf
-r-------- 1 emma emma 28120 Jan 17 2014 cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ rm cd/Drivers/Drivers_List.rtf
rm: cannot remove ‘cd/Drivers/Drivers_List.rtf’: Permission denied
emma@emma-W54-55SU1-SUW:~$ chmod 660 cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ ls -l cd/Drivers/Drivers_List.rtf
-rw-rw---- 1 emma emma 28120 Jan 17 2014 cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ rm cd/Drivers/Drivers_List.rtf
rm: cannot remove ‘cd/Drivers/Drivers_List.rtf’: Permission denied
emma@emma-W54-55SU1-SUW:~$ chmod 777 cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ ls -l cd/Drivers/Drivers_List.rtf
-rwxrwxrwx 1 emma emma 28120 Jan 17 2014 cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ rm cd/Drivers/Drivers_List.rtf
rm: cannot remove ‘cd/Drivers/Drivers_List.rtf’: Permission denied
emma@emma-W54-55SU1-SUW:~$ lsattr cd/Drivers/Drivers_List.rtf
-------------e-- cd/Drivers/Drivers_List.rtf
emma@emma-W54-55SU1-SUW:~$ ls -alh cd/Drivers
total 48K
dr-x------ 11 emma emma 4.0K Feb 3 02:15 .
drwxrwxr-x 3 emma emma 4.0K Feb 3 01:44 ..
dr-x------ 7 emma emma 4.0K Jan 14 2014 01Chipset
dr-x------ 3 emma emma 4.0K Jan 14 2014 02Video
dr-x------ 9 emma emma 4.0K Jan 14 2014 03Lan
dr-x------ 9 emma emma 4.0K Jan 14 2014 04CReader
dr-x------ 3 emma emma 4.0K Jan 17 2014 05Touchpad
dr-x------ 3 emma emma 4.0K Jan 14 2014 06Airplane
dr-x------ 2 emma emma 4.0K Jan 17 2014 07Hotkey
dr-x------ 12 emma emma 4.0K Jan 14 2014 08IME
dr-x------ 7 emma emma 4.0K Jan 14 2014 09Audio
-r-------- 1 emma emma 162 Feb 24 2012 ~$ivers_List.rtf
(I've already deleted cd/Drivers/Drivers_List.rtf
using sudo
as a test.)
grep /home /etc/mtab
say, just for completeness' sake? – Ulrich Schwarz Feb 02 '15 at 17:01grep /home /etc/mtab
returns no matches. – EmmaV Feb 02 '15 at 17:22stat Drivers/Drivers_List.rtf
but the output is forcd/Drivers/Drivers_List.rtf
? What is the relationship between the two? – user Feb 02 '15 at 18:59emma@emma-W54-55SU1-SUW:~$ stat cd/Drivers/Drivers_List.rtf
line, so I added it in later, but I omitted thecd/
part by mistake. – EmmaV Feb 02 '15 at 22:05