[ 
https://issues.apache.org/jira/browse/HDFS-948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646585#comment-13646585
 ] 

Daryn Sharp commented on HDFS-948:
----------------------------------

bq. The motivation is to allow an admin to create a link in a directory that 
users can write but disallow them from deleting the link.

Unless I'm misunderstanding, this isn't a valid use case.  Delete/rename is a 
dir level operation so the parent dir's permissions dictate whether the 
operation is allowed.  The child path's (dir/file/symlink) permissions are 
irrelevant.

If you want to prevent a symlink from being deleted in the writable dir, you 
need to add the sticky bit to the parent dir.  The sticky bit adds the 
restriction that child paths can only be renamed/deleted by the owner of the 
path or the owner of the parent dir.
                
> Allow setting permissions on links
> ----------------------------------
>
>                 Key: HDFS-948
>                 URL: https://issues.apache.org/jira/browse/HDFS-948
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: hdfs-client, namenode
>            Reporter: Eli Collins
>            Priority: Minor
>
> In HDFS-245 symlink permissions are ignored, access to a symlink is 
> determined by the permissions of the symlink target. 
> FileContext#setPermission and setOwner work like {{chmod}} and {{chown}}, 
> symlinks are fully resolved. This jira is for adding FileContext#setLinkOwner 
> and friends, ie a {{lchown}} (IEEE 1003.1) equivalent. The motivation is to 
> allow an admin to create a link in a directory that users can write but 
> disallow them from deleting the link.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to