file permissions, rm & the sticky bit of permission...
Learning :
puzzling over the failure of rm command over a file with rw-rw-rw perms in the /tmp directory.
file was created by user-x group-x
file was being deleted by user-y group-y
the removal should have worked fine with the file perms. alas! rm -rf ended up throwing a permission denied error.
after breaking heads for awhile found the root cause and the solution :)
the issue was caused by the sticky bit set on the /tmp directory - which prevented any deletions of the file other than the owner.
thanks to -
http://docsrv.sco.com:507/en/OSAdminG/ssC.stickydirs.html
http://linuxnorthwest.com/info/linux-file-permission-confusion/
removed the sticky bit from /tmp folder permissions and voila - things worked as expected!
puzzling over the failure of rm command over a file with rw-rw-rw perms in the /tmp directory.
file was created by user-x group-x
file was being deleted by user-y group-y
the removal should have worked fine with the file perms. alas! rm -rf ended up throwing a permission denied error.
after breaking heads for awhile found the root cause and the solution :)
the issue was caused by the sticky bit set on the /tmp directory - which prevented any deletions of the file other than the owner.
thanks to -
http://docsrv.sco.com:507/en/OSAdminG/ssC.stickydirs.html
http://linuxnorthwest.com/info/linux-file-permission-confusion/
removed the sticky bit from /tmp folder permissions and voila - things worked as expected!