I am not being to access any functions in my desktop and I don't have an OS besides Ubuntu and I am new to Ubuntu. I think I rebooted my computer thinking that Google Chrome crashed. I opened Google Chrome but it showed opening message but never opened so I restarted my computer. and when my system was loading (I was playing with keyboard dont know what I typed) and when by Ubuntu loaded, I was unable to access anything some of characteristics are listed below:
I cannot hear any sound
I cannot access wired ethernet connection on the right corner where I usually enable to access internet and I have no internet.
There is no local apache server either. when ever I try to start apacer I get setuid must be root or something.
When I type sudo then I get message setuid must be root.
I cannot access orther external storage devices like pendrive and portable hard drive and cannot mount my other drives with FAT32 filesystem.
When I try to start my apache webserver with out typing sudo then I get message cannnot open socket or something like it.
I remember also doing command
chown -R www-data /
earlier and got error message
I cannot shutdown my computer, it only logs off
The apache command you tried is clearly the problem, it's caused all sorts of files to now be owned by www-data instead of root, your user and a bunch of other system users that operate the machine.
It would be very hard to try and recover the machine in it's current state and instead the best action to take is to reinstall. Make sure you back up all your files first by booting a liveCD or liveUSB. You may need another machine in order to make the equipment you need to do the recovery.
If you are having a really hard time, then seek out a local Ubuntu service person who can help. There are businesses that offer servicing now as well as individuals from LoCo teams around the world.
The most complete way to try and recover your system is with a reinstall. However you can try something to this affect which should produce some viable results.
This brings everything else on the system back into ownership of root, and home folders into ownership of themselves.
Several system directories will need to be updated to different ownerships. On a close-to-stock version of Ubuntu they are as follows:
You'll need to realize that there are other software and software configurations that may break because they are still not owned by the right user. Typically if you run
on that package it'll revert things properly.