shell 会话应该会说清楚一切:我无法删除文件(movie.avi
),尽管我有写入权限。我不明白问题出在哪里。我遗漏了什么吗?
confus@homeserver:/home/narur$ id
uid=1000(confus) gid=1000(confus) groups=1000(confus),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),106(lpadmin),117(sambashare),118(debian-transmission),1001(narur)
confus@homeserver:/home/narur$ ll | grep movie.avi
-rw-rw---- 1 narur narur 1,4G Jan 11 09:42 movie.avi
confus@homeserver:/home/narur$ rm movie.avi
rm: cannot remove `movie.avi': Permission denied
# # # # SOME INFOS ON MY SYSTEM:
confus@homeserver:/home/narur$ lsb_release -dc
Description: Ubuntu 12.10
Codename: quantal
confus@homeserver:/home/narur$ uname -a
Linux conserve 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
答案1
要删除文件,您不需要该文件的写权限,但需要该文件所在文件夹的写和执行权限。