alexandresalome / behat-launcher

Launch Behat tests from your browser
MIT License
63 stars 7 forks source link

File permissions #3

Closed mnapoli closed 10 years ago

mnapoli commented 10 years ago

I had to run:

mkdir data/cache
chmod -R 777 data/cache

so that a fresh install could work (if the user running the website, e.g. Apache, is different from the logged in user).

I believe you can commit file permissions in git, so maybe you should commit a data/cache folder and the 777 permissions on it?

mnapoli commented 10 years ago

Same thing with data/output_files

mnapoli commented 10 years ago

Actually, the problem with data/output_files is that I run the "runner" from CLI, which means the user of the process is me. All files generated will be restricted to read to my user account.

Now Apache wants to display the log of the Behat run, and cannot read those files because it runs with www-data.

So everytime I run a new test, I have to run chmod -R 777 data/output_files so that Apache can read them.

Maybe when writing those files the PHP process could chmod them directly?

alexandresalome commented 10 years ago

I've added umask(0000) at the beginning of every entry point. Please confirm "it works".

Thanks in advance, Alexandre

mnapoli commented 10 years ago

Will do.

By the way I've set up the project at work and it looks amazing. It's not perfect yet to integrate it smoothly, but it's a very promising project. I've launched a big ass test suite (several hours) I'll see tomorrow if it all worked correctly.

mnapoli commented 10 years ago

Works!

FYI the whole test suite ran perfectly. I confirm this is awesome :)