Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.3-alpha, 3.0.0-alpha1
-
None
-
Reviewed
Description
With permissions enabled, the permission check in FSNamesystem#delete will incorrectly throw an UnresolvedLinkException if the path contains a symlink. This leads to FileContext resolving the symlink and instead deleting the link target.
The correct check is to see if the user has write permissions on the parent directory of the symlink, e.g.
-> % ls -ld symtest drwxr-xr-x 2 root root 4096 Apr 26 14:12 symtest -> % ls -l symtest total 12 lrwxrwxrwx 1 root root 6 Apr 26 14:12 link -> target -rw-r--r-- 1 root root 0 Apr 26 14:11 target -> % rm -f symtest/link rm: cannot remove `symtest/link': Permission denied -> % sudo chown andrew symtest -> % rm -f symtest/link -> %
Attachments
Attachments
Issue Links
- blocks
-
HDFS-5067 Support symlink operations
- Closed