This question already has an answer here:
I have certain doubts regarding file permissions.I am gonna list them one by one.
By the way I am logged in as root and using Red Hat Linux.
1.When I change the permission for a file to only read eg- chmod 400 file1,I can yet use cat command and add some content to it.Shouldn't I have the access only to read the file?
2.If I give read permission to a folder eg- chmod 400 folder1,I can still add files to it.So what exactly read permission means for a folder or a execute for that instance?
3.If I am logged in as root,do I always have all the permissions ie read,write and execute?Because that's what is happening.I am able to access any file and folder irrespective of the permissions set.
So is there any way to achieve my objectives?