Sometimes ago i experienced couple of errors in my Ubuntu 12.10 and i was getting the permission denied error in a lot of Softwares. Finally i found the solution. I found out that a lot of the files in my system including the files and folders in the "home" directory like "pictures" "desktop" "music" and other folders are set to "www-data" in the permission tab when i click on every and each one of those folders and files i right clicked on and then clicked on properties. So one solution is to become root in nautilus and then change that "www-data" to "user-name" in every file or folder, but it will take a long time for me to do that. So my question is, is there any easier way to make "user-name" default again?
after i ran this command:
find /home/{username} -user www-data | xargs sudo chown {username}
i got these errors:
amirrazor@ubuntu:~$ find /home/amirrazor -user www-data | xargs sudo chown amirrazor
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
[sudo] password for amirrazor:
chown: cannot access `/home/amirrazor/test': No such file or directory
chown: cannot access `piano.wma': No such file or directory
chown: cannot access `/home/amirrazor/Ubuntu': No such file or directory
chown: cannot access `One/Shared': No such file or directory
chown: cannot access `With': No such file or directory
chown: cannot access `Me': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000003': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000007': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000002': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/data_1': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000004': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/index': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/data_2': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000006': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000001': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/data_3': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/f_000005': No such file or directory
chown: cannot access `/home/amirrazor/old_Media': No such file or directory
chown: cannot access `Cache_000/data_0': No such file or directory
You could do something in bash easily enough, if you're not concerned about loosing www-data as the owner of files.
If Bob wants to own all the files on his home folder:
Some system files in the home folder are not meant to be owned by the user but a reboot should recreate them.