Do not recreate the vnc tokens dir if it already exists
|Assignee:||Daniel Molina||% Done:|
|Target version:||Release 4.4|
Another thing biting me are the functions in OpenNebulaVNC.rb creating and removing the sunstone_vnc_tokens directory. The directory is created with oneadmin as owner and group. If you're running sunstone with Apache Passenger it depends on the user you're running passenger with if it's able to write new tokens or not. Documentation assumes passenger runs as user www-data  (although you can easily change that). With the default configuration passenger is not allowed to write tokens in that directory and an error will be thrown. It would be nice if OpenNebulaVNC could check what user passenger runs as, and create the directory accordingly. What is the reason this directory should be created "on the fly" anyway? It seems to complicate things a bit.