ID #1013

Linux non può eliminare file o directory propri

Alcune volte non si possono cancellare dei file o delle directory usando i comandi rf -Rf nome_directory

rm nome_file
Anche se sei il proprietario del gruppo di appartenenza di questi file o utente root. command. I'm the owner of those file and the group assigned to those files is also a group my user is in. What's even weirder is that I can edit their content and I can change the permissions for them, but I can't move or delete them.

 

Don't forget the use of "lsattr" and "chattr" command line...

:~/temp$ touch pippo.txt
:~/temp$ ls -la pippo.txt
:~/temp$ -rw-r--r-- 1 root root 0 2014-03-13 16:35 pippo.txt
:~/temp$ chattr +i pippo.txt
:~/temp$ lsattr pippo.txt
:~/temp$ ----i-------------- pippo.txt
:~/temp$ rm pippo.txt
rm: remove write-protected regular empty file 'pippo.txt'? y
rm: cannot remove 'pippo.txt': Operation not permitted
:~/temp$ sudo chattr -i pippo.txt
:~/temp$ lsattr pippo.txt
:~/temp$ ------------------- pippo.txt
:~/temp$ rm pippo.txt
:~/temp$ ls
:~/temp$

Have a look at "lsattr" & "chattr" Linux command line

Tags: chattr, Command line, linux, ls, lsattr, rm

FAQ correlate:

Tu puoi: Commenta questa FAQ