You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2008/08/14 19:07:44 UTC

[jira] Created: (HADOOP-3953) Sticky bit for directories

Sticky bit for directories
--------------------------

                 Key: HADOOP-3953
                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
             Project: Hadoop Core
          Issue Type: Improvement
          Components: dfs
            Reporter: Koji Noguchi


Our users (especially Pig) heavily use /tmp for temporary storage. 
Permission are set to 777.

However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
It would be nice if we can have a sticky bit like unix. 

Copy&Pasted from manpage.

STICKY DIRECTORIES
       When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
       root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
       files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653497#action_12653497 ] 

Arun C Murthy commented on HADOOP-3953:
---------------------------------------

bq. To keep Unix-like semantics, it seems reasonable to be able to set the sticky bit on a file (compared to a directory), but that doing so will have no effect on the file. Unless anyone has a good reason to deviate? 

+1 with the caveat that we heavily document the meaning of sticky bit for files.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Attachment: HADOOP-3953.patch

Updated with Nicholas' suggestions.
{noformat}     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 8 new or modified tests.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
{noformat}

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663962#action_12663962 ] 

Jakob Homan commented on HADOOP-3953:
-------------------------------------

All local unit tests passed except the known-failure documented in HADOOP-4907.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Hemanth Yamijala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622766#action_12622766 ] 

Hemanth Yamijala commented on HADOOP-3953:
------------------------------------------

+1. When working on HOD, it seemed like this would be very useful in some cases where we wanted shared space for all users.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653488#action_12653488 ] 

Jakob Homan commented on HADOOP-3953:
-------------------------------------

To keep Unix-like semantics, it seems reasonable to be able to set the sticky bit on a file (compared to a directory), but that doing so will have no effect on the file.  Unless anyone has a good reason to deviate?

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Open  (was: Patch Available)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Patch Available  (was: Open)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662135#action_12662135 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-3953:
------------------------------------------------

- The changes in FSDirectory should be reverted since the case is already taken care in INodeFile.

- For the unit tests, leaving empty catch block is generally a bad practice since there might be some unexpected exceptions.  For example, in the codes below, it is correct only if ioe is a sticky bit related exception.  It is incorrect if some other IOException like FileNotFoundException is thrown.
{code}
+      try {
+        hdfs.rename(file, new Path(tmpPath2, "renamed"));
+        fail("Shouldn't be able to rename someone else's file with SB on");
+      } catch (IOException ioe) {
+        // Correct
+      }
{code}
It would be great if you can combine some of them together, so that they take less execution time.  I am fine if you don't want to change the tests although I strongly recommend to do so.

Sorry for not seeing these problems in my previous review.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Open  (was: Patch Available)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Release Note: Implement sticky bit for directories in HDFS.  Is incompatible as prior versions of Hadoop will not be able to read the persisted mode value.
    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Open  (was: Patch Available)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661407#action_12661407 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-3953:
------------------------------------------------

patch looks good to me.  Only one nit: FsPermission.set(FsAction u, FsAction g, FsAction o) is not useful anymore, please remove it.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Hadoop Flags: [Incompatible change]

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-3953:
-------------------------------------------

    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Incompatible change])

+1 patch looks good.

Please post the local unit test results when they are ready.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664365#action_12664365 ] 

Raghu Angadi commented on HADOOP-3953:
--------------------------------------

Jakob, release notes sounds much scarier than it should be. Just selecting an incompatible flag is enough, I think.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-3953) Sticky bit for directories

Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633390#action_12633390 ] 

Allen Wittenauer commented on HADOOP-3953:
------------------------------------------

We just had a user wipe out /tmp.

When are we getting this capability? :)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Attachment: HADOOP-3953.patch

* Addressed Nicholas' comments
* Refined chmod processing
* Tightened up testing
{noformat}
     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 10 new or modified tests.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
{noformat}


> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Attachment: HADOOP-3953.patch

Here's an initial patch for review.  This includes the sticky bit implementation and unit tests.  I still need to go through the user documentation and update that; I'll do that now and update the patch shortly with just the documentation changes.  

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Attachment: HADOOP-3953.patch

Updated user docs and shell help. Ready for review.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-3953:
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.21.0
     Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])
           Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Jakob!

This needs release note.  Please fill it out.

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Patch Available  (was: Open)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Patch Available  (was: Open)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Status: Patch Available  (was: Open)

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan updated HADOOP-3953:
--------------------------------

    Release Note: Implement sticky bit for directories in HDFS.   (was: Implement sticky bit for directories in HDFS.  Is incompatible as prior versions of Hadoop will not be able to read the persisted mode value.)
    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch, HADOOP-3953.patch
>
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HADOOP-3953) Sticky bit for directories

Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-3953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Homan reassigned HADOOP-3953:
-----------------------------------

    Assignee: Jakob Homan

> Sticky bit for directories
> --------------------------
>
>                 Key: HADOOP-3953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3953
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Jakob Homan
>
> Our users (especially Pig) heavily use /tmp for temporary storage. 
> Permission are set to 777.
> However, this means any users can rename and also remove (by moving to .Trash) other users directories and files.
> It would be nice if we can have a sticky bit like unix. 
> Copy&Pasted from manpage.
> STICKY DIRECTORIES
>        When  the  sticky  bit  is set on a directory, files in that directory may be unlinked or renamed only by
>        root or their owner.  Without the sticky bit, anyone able to write to the directory can delete or  rename
>        files.  The sticky bit is commonly found on directories, such as /tmp, that are world-writable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.