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")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
/* create the path if it doesn't exist. no "mkdir -p" here, so do it
* step by step.
*/
/* 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;
}
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));
if (ret < 0 && errno != EEXIST) {
RTE_LOG(ERR, EAL, "Error creating '%s': %s\n",
runtime_dir, strerror(errno));
/* create the path if it doesn't exist. no "mkdir -p" here, so do it
* step by step.
*/
/* 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;
}
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));
if (ret < 0 && errno != EEXIST) {
RTE_LOG(ERR, EAL, "Error creating '%s': %s\n",
runtime_dir, strerror(errno));