On Wed, Aug 08, 2001 at 04:41:37PM +0200, Daniel Quappe wrote:
today i found something which i never had recognized before...;-)
situation 1: if i touch a file as user "root" in /home/daniel and the "/home/daniel"-dir is 755, the user "wwwrun" (after "su - wwwrun") CANNOT remove the created file (mode 700, owned by root).
situation 2: if i now "chmod 777 /home/daniel" the created file (still mode 700, owned by root) CAN be removed by the user "wwwrun"...very strange to me!
does the worldwriteability of the dir have a higher priority than the permission-mode of the file itself (the file was mode 700 and owned by root!!)?!
Yes. Deleting a file means to remove the link to it from the directory. If you can write to the directory, you can remove the link and hence delete the file. Best regards, Lutz -- Lutz Jaenicke Lutz.Jaenicke@aet.TU-Cottbus.DE BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/ Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129 Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153