[SOLVED] file permission
by testy8888 from LinuxQuestions.org on (#57709)
Hi,
if i use rm -rf file under a directory i can see that the directory permission is the only thing that matters and not the permission of file itself.
The file is /home/y/y5/y9.I like to see if i can delete this file in certain condition.
ls -ld /home/y/y5
drwxrwx---. 2 y y 16 Aug 22 08:09 /home/y/y5
ls -l /home/y/y5
total 0
----------. 1 y y 0 Aug 22 08:09 y9
rm -rf /home/y/y5/y9
ls -l /home/y/y5
total 0
Even if this file has no permitions i am able to delete it.
i thought that the file should has w on u and g permission of the file in order to delete it.


if i use rm -rf file under a directory i can see that the directory permission is the only thing that matters and not the permission of file itself.
The file is /home/y/y5/y9.I like to see if i can delete this file in certain condition.
ls -ld /home/y/y5
drwxrwx---. 2 y y 16 Aug 22 08:09 /home/y/y5
ls -l /home/y/y5
total 0
----------. 1 y y 0 Aug 22 08:09 y9
rm -rf /home/y/y5/y9
ls -l /home/y/y5
total 0
Even if this file has no permitions i am able to delete it.
i thought that the file should has w on u and g permission of the file in order to delete it.