Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5D0C9200B32 for ; Wed, 25 May 2016 01:18:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5B733160A37; Tue, 24 May 2016 23:18:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A41D6160A35 for ; Wed, 25 May 2016 01:18:16 +0200 (CEST) Received: (qmail 46184 invoked by uid 500); 24 May 2016 23:18:15 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 46172 invoked by uid 99); 24 May 2016 23:18:15 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 May 2016 23:18:15 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E3CA52C14DC for ; Tue, 24 May 2016 23:18:14 +0000 (UTC) Date: Tue, 24 May 2016 23:18:12 +0000 (UTC) From: "Tianyin Xu (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-10455) Logging the username when deny the setOwner operation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 24 May 2016 23:18:17 -0000 Tianyin Xu created HDFS-10455: --------------------------------- Summary: Logging the username when deny the setOwner operation Key: HDFS-10455 URL: https://issues.apache.org/jira/browse/HDFS-10455 Project: Hadoop HDFS Issue Type: Bug Components: namenode Affects Versions: 2.7.2 Reporter: Tianyin Xu Priority: Minor Attachments: HDFS-10455.000.patch The attached patch appends the user name in the logging when the setOwner operation is denied due to insufficient permissions on this user (based on his/her name). The same practice is used in {{FSPermissionChecker}} such as {{checkOwner()}} and {{checkSuperuserPrivilege()}}. {code:title=FSDirAttrOp.java|borderStyle=solid} if (!pc.isSuperUser()) { if (username != null && !pc.getUser().equals(username)) { - throw new AccessControlException("Non-super user cannot change owner"); + throw new AccessControlException("User " + pc.getUser() + + " is not a super user (non-super user cannot change owner)."); } if (group != null && !pc.containsGroup(group)) { - throw new AccessControlException("User does not belong to " + group); + throw new AccessControlException("User " + pc.getUser() + + " does not belong to " + group); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org