From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 4134BD0C9 for ; Fri, 18 May 2018 15:55:51 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id w194-v6so14217388wmf.2 for ; Fri, 18 May 2018 06:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=Q+3DYDfEhC23uT6GO/v5uVkYa7EQ2szEL5r7JKv3YEM=; b=EA6Wx1EQdh3IjE6Ys1ukjyBxKVrZKHDJcFugt7MXawl4K9s7LXKuBsMNrhQ54D7YGz CboFgux78RWu8ncbhgjZho+tg2pQB+Jvvq1stf5Jsvsqfq5NhUy4Z6FpjHwMd1zMSimn N8xVIlQ7lZ0fR0ZMsTEUtjQDbllMLaIMMnAJPULGpNCbLq5ihb2LrtDLPr6YIenaBp/3 iTaBPxWdv8VCq44D+JCe05waoj5XdgSdna/fKcShsE7e9cCZVofCpioCKFYGbFN9C3Fw 8LWcnPkMNtDWWKgKzK0pxGASP1tX+99JJwRc6KZYK5Vv5xsesG9lyOg9cOWWCK7U0pAo q84Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=Q+3DYDfEhC23uT6GO/v5uVkYa7EQ2szEL5r7JKv3YEM=; b=ttmoJY9DtqrhfB+UwYGAQT+s3TDeyNfEqEH9RUMCSGrUb4++fM6Qyn7yXdUzr7sDUE HvczBo5a/IN57KzQ3DFH77FT3srtOwiJtMSlFAnmQ42vYBFVGgoHLqjEoDD8tl0uYC5I 35rtANjVGuhgSim5k2Vloo+PeJHOZsLe1D8OfuZ9buBmI4rAtusmEYmIN8z0aqsfjY8/ xKiy1NHiA/FBDe8TDH2f+gEd02d3Rt/AmtL55InvlYNT4nJDCJP+6w+ogy3vmujCxQG+ rqIrPVJmlF72VkxIl30WbLjIKNZCG9nThdFn4GdzGT8iD1FxrHJQT04Wb+lqXivNqud1 Gptg== X-Gm-Message-State: ALKqPwdZAoE0bmyyUOhvqcbX86KKIm7R7pkxzJ5VPqLlNaeynFLkw6cU idbshmkJvu5S3koQ0hh+5/PBfA== X-Google-Smtp-Source: AB8JxZoGzh5OsAf1s5cTTUbwFOnYx5OxB+wcXXYzzPP8lwB/i1ckWHUsWsF9s1SA5P9wcrqcxMbbDg== X-Received: by 2002:a1c:5d4f:: with SMTP id r76-v6mr4563141wmb.55.1526651750838; Fri, 18 May 2018 06:55:50 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id q2-v6sm7724996wrj.57.2018.05.18.06.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 06:55:49 -0700 (PDT) Date: Fri, 18 May 2018 15:55:35 +0200 From: Adrien Mazarguil To: Anatoly Burakov Cc: dev@dpdk.org Message-ID: <20180518135437.30692-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] eal: fix directory permissions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 13:55:51 -0000 Executable bit must be set on directories for normal users to enter them. This patch addresses the inability to start DPDK applications as non-root due to errors such as: EAL: failed to bind /tmp/dpdk/rte/mp_socket: Permission denied Fixes: 56236363b481 ("eal: add directory for runtime data") Cc: Anatoly Burakov Signed-off-by: Adrien Mazarguil --- lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- lib/librte_eal/linuxapp/eal/eal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 7f8475eac..dc279542d 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -123,14 +123,14 @@ eal_create_runtime_dir(void) /* create the path if it doesn't exist. no "mkdir -p" here, so do it * step by step. */ - ret = mkdir(tmp, 0600); + ret = mkdir(tmp, 0700); if (ret < 0 && errno != EEXIST) { RTE_LOG(ERR, EAL, "Error creating '%s': %s\n", tmp, strerror(errno)); return -1; } - ret = mkdir(runtime_dir, 0600); + ret = mkdir(runtime_dir, 0700); if (ret < 0 && errno != EEXIST) { RTE_LOG(ERR, EAL, "Error creating '%s': %s\n", runtime_dir, strerror(errno)); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 150d5dd13..8655b8691 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -131,14 +131,14 @@ eal_create_runtime_dir(void) /* create the path if it doesn't exist. no "mkdir -p" here, so do it * step by step. */ - ret = mkdir(tmp, 0600); + ret = mkdir(tmp, 0700); if (ret < 0 && errno != EEXIST) { RTE_LOG(ERR, EAL, "Error creating '%s': %s\n", tmp, strerror(errno)); return -1; } - ret = mkdir(runtime_dir, 0600); + ret = mkdir(runtime_dir, 0700); if (ret < 0 && errno != EEXIST) { RTE_LOG(ERR, EAL, "Error creating '%s': %s\n", runtime_dir, strerror(errno)); -- 2.11.0