Score:1

stress-ng failing with temp-path '.' must be readable

in flag

Ultimately, I want to execute stress-ng from a php script.

In testing, I've realized it runs fine from the CLI under my account (in folders where I have permission). It also runs fine as root. But as sudo, it DOESN'T run. And I'm going to presume that's why the script won't execute either. So I'm not sure what I'm doing wrong.

The command:

sudo stress-ng --temp-path /tmp/stress-tmp/ -c 10 -t 10

The error:

aborting: temp-path '.' must be readable and writeable

The underlying system is Ubuntu.

/tmp/stress-tmp is chmod-ed to 777 (for now, until I figure out what the deal is).

I've tried chown-ing /tmp/stress-tmp to multiple users (me, root, www-data, etc) with no change.

It also seems weird that I'm specifying the temp-folder, but I'm being told the current directory (no matter where I execute from) isn't readable or (ahem) writeable (sic).

Thanks (as always) in advance.

terdon avatar
cn flag
If your `/tmp/stress-tmp` is 777 (which is normal for things under `/tmp`) and you are getting this error, then you're probably not actually in `/tmp/stress-tmp`. You haven't told us how you execute this, are you running it through a php script which is executed by a webserver or have you simply run the `stress-ng` command manually from a terminal? If the former, try running `pwd` in the same way to see what directory it reports.
Leon Adato avatar
in flag
I'm running the comment (sudo stress-ng --temp-path /tmp/stress-tmp/ -c 10 -t 10) from the CLI and getting that error. That's why it's confusing me so much. And I'm executing it from /tmp/stress-tmp (or ~/ or just about anywhere). Still getting the error. That's why this is bugging me so much. And just to clarify: once I get this working from the CLI, I believe I'll understand why executing from a php script (using an exec() or backtic instruction) is failing. But I'm trying to work my way up to that.
Colin Ian King avatar
cn flag
run sudo strace -f stress-ng --temp-path /tmp/stress-tmp/ -c 10 -t 10 and then look at the output, you will see the open failure on /tmp/stess-tmp and that will provide more information on why it is failing
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.