1.

A file has a permission set as 777 ie rwxrwxrwx but the directory permissions are 400. If the user tries to delete the file, will he be able to do it?(a) Yes(b) NoI had been asked this question in quiz.This intriguing question originated from Changing File Ownership and Permissions in section Basic File Attributes of Unix

Answer»

The correct option is (b) No

The best EXPLANATION: Since we have only read permissions for the DIRECTORY and the directory permissions do not ALLOW us to add or REMOVE a file from it we cannot delete a file no matter what is the permission set of that file.



Discussion

No Comment Found

Related InterviewSolutions