Hi. Raspberry newbie here.
I just bought Raspberry PI B, installed Raspbian, and I wrote a program which uses I2C to get data from AVR microcontroller. But, the problem is that program only works from root directory. If I move it to /var/www and try to compile and run it from here, I2C stops working - I get read or write error. What could be the problem? It's definitely not error in programming, since it works every time from root directory and never works from /var/www directory. I choose that directory so my files could be accessible from the internet. I'm running apache server on it.