Artificial intelligent assistant

Do Linux directory permissions overrule file permissions? drwxrwxrwx 2 user1 user1 4096 Jun 21 11:25 . drwxr-xr-x 16 user1 user1 4096 Jun 21 11:25 .. -rw-r--r-- 1 user1 user1 15 Jun 21 11:25 access.txt The file access.txt is owned by user **user1** but the directory has open access to the world (777). If I log in with **user2** , I can delete **access.txt** even though **user2** does not have write permissions to it. So does directory permissions take precedence over file permissions? Perhaps that not the best way to describe it, but just looking for a basic explanation here.

Unlinking `access.txt` from the directory is not a change to `access.txt`, but a change to the directory, so user2's write permission on the _directory_ is what is relevant.

The write permission on the _file_ would be of interest if user2 wanted to modify the file, rather than the containing directory.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d32da2bc72495fc9bd9ee6f004292418