Question: I have this file:

```
$ ls -l  store.sh 
-rwxr-xr-x   1 root apache    117 Feb  5  2016 store.sh

$ id
uid=48(apache) gid=48(apache) groups=48(apache)

```

I think that I haven't the permission to edit this file but was possible delete and replace the file. How can it be? Can someone explain this behaviour?

Answer: 
You don't need write permissions on a file to delete or move (rename) it. You need write permissions on the directory *containing* the file, because *deleting or renaming are not operations on the file, but operations on the directory's list of files*. So in this case the directory of this file probably has write access for the `apache` user or the `apache` group.
Deleting a file doesn't modify the file in question rather it modifies the parent directory as it removes the file from directory listing. This also means that you have full permissions to the parent directory of the file