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 "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2008/04/09 22:54:05 UTC

[jira] Created: (HADOOP-3222) fsck should require superuser privilege

fsck should require superuser privilege
---------------------------------------

                 Key: HADOOP-3222
                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
             Project: Hadoop Core
          Issue Type: Bug
          Components: dfs
            Reporter: Tsz Wo (Nicholas), SZE


Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Resolved: (HADOOP-3222) fsck should require superuser privilege

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

Tsz Wo (Nicholas), SZE resolved HADOOP-3222.
--------------------------------------------

    Resolution: Invalid

Close this issue as INVALID.

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

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

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

There are several reasons that fsck is better started by a superuser:
- fsck may access a lot of files/dirs.  If we check permission for each file/dir, the performance may be a problem.
- fsck uses namenode resource intensively.  It will be relatively easy to use it for DDOS.
- fsck traditionaly is used for check and repair file system, which is an admin operation.  If we need some command for finding the distribution of a directory's data blocks, we are better to create a new one.

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "Edward J. Yoon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587550#action_12587550 ] 

Edward J. Yoon commented on HADOOP-3222:
----------------------------------------

>> I don't think this should require super user privilege. In particular, users should be able to run it on directories that they own or have read-access on. One specific use case is finding the distribution of a directory's data blocks.

+1 

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "lohit vijayarenu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587814#action_12587814 ] 

lohit vijayarenu commented on HADOOP-3222:
------------------------------------------

Apart from getting block locations users might not find any use of fsck. Would it easier if we had another command to get block locations for users and make fsck superuser only task because fsck also has options such as -move / -delete which might be best restricted to super user.

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Issue Comment Edited: (HADOOP-3222) fsck should require superuser privilege

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

szetszwo edited comment on HADOOP-3222 at 4/10/08 3:54 PM:
-------------------------------------------------------------------------

There are several reasons that fsck is better started by a superuser:
- fsck may access a lot of files/dirs.  If we check permission for each file/dir, the performance may be a problem.
- fsck uses namenode resource intensively.  It will be relatively easy to use it for DDOS.
- fsck traditionaly is used for checking and repairing file system, which is an admin operation.  If we need some command for finding the distribution of a directory's data blocks, we are better to create a new one.

Even if we don't require superuser to run fsck, we have to define what are the permissions required for fsck and its options.  There is no permission check for fsck currently, i.e. any user can run fsck in any dir.

      was (Author: szetszwo):
    There are several reasons that fsck is better started by a superuser:
- fsck may access a lot of files/dirs.  If we check permission for each file/dir, the performance may be a problem.
- fsck uses namenode resource intensively.  It will be relatively easy to use it for DDOS.
- fsck traditionaly is used for check and repair file system, which is an admin operation.  If we need some command for finding the distribution of a directory's data blocks, we are better to create a new one.
  
> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587838#action_12587838 ] 

Owen O'Malley commented on HADOOP-3222:
---------------------------------------

The DDOS possibility is not relevant. It is clearly possible to do many many other ways until we have user-based throttling in the name node.

It doesn't seem like the file permission check should be a performance problem as long as you don't do the recursive check each time, which would be rather pointless. *smile*

Our fsck is much more useful to non-root users precisely because you can limit it to a given directory tree. It is completely desirable for me to ask if any blocks in my directory are missing.

I agree that move and delete both should require write permission and move should be to some location that is in the user's home dir...


> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Issue Comment Edited: (HADOOP-3222) fsck should require superuser privilege

Posted by "Lohit Vijayarenu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602489#action_12602489 ] 

lohit edited comment on HADOOP-3222 at 6/4/08 10:38 PM:
-------------------------------------------------------------------

I agree to what Owen and Dhurba suggested. At the minimum, should we have the permission check. Consider this.
hadoop dfs -ls honors permission, so, userA will not be able to see directory listing of userB. While userA can always run hadoop fsck and get the listing of userB's directory

      was (Author: lohit):
    I agree to what Owen and Dhurba suggested. At the minimum, should we have the permission check. Consider this.
hadoop dfs -ls honors permission, so, userA will not be able to see directory listing of userB. While userB can always run hadoop fsck and get the listing
  
> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587483#action_12587483 ] 

Owen O'Malley commented on HADOOP-3222:
---------------------------------------

I don't think this should require super user privilege. In particular, users should be able to run it on directories that they own or have read-access on. One specific use case is finding the distribution of a directory's data blocks.

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587842#action_12587842 ] 

dhruba borthakur commented on HADOOP-3222:
------------------------------------------

I agree that it makes sense to make fsck do permission checking for the nodes that it traverses. If a user does a fsck on files/directories that he/she has access to (using permissions) then that invocation of fsck should be allowed. 

Since "/" is usually owned by super-user, only super-user should be allowed to run fsck on "/".

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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


[jira] Commented: (HADOOP-3222) fsck should require superuser privilege

Posted by "Lohit Vijayarenu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602489#action_12602489 ] 

Lohit Vijayarenu commented on HADOOP-3222:
------------------------------------------

I agree to what Owen and Dhurba suggested. At the minimum, should we have the permission check. Consider this.
hadoop dfs -ls honors permission, so, userA will not be able to see directory listing of userB. While userB can always run hadoop fsck and get the listing

> fsck should require superuser privilege
> ---------------------------------------
>
>                 Key: HADOOP-3222
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3222
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> Currently, any user can run fsck.  It should require superuser privilege.

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