Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3259  / 1 Year ago, tue, february 14, 2023, 7:50:36

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

More From » 12.10

 Answers
4

If Bob wants to own all the files on his home folder:



sudo chown -Rc bob:bob /home/bob



  • R means recursive.

  • bob:bob is the user:group for Bob, which usually have the same name



Some system files in the home folder are not meant to be owned by the user but a reboot should recreate them.


[#32773] Thursday, February 16, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
egantfis

Total Points: 406
Total Questions: 108
Total Answers: 108

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
egantfis questions
Mon, Nov 1, 21, 03:37, 3 Years ago
Fri, Mar 18, 22, 23:26, 2 Years ago
Mon, Mar 6, 23, 05:03, 1 Year ago
Sun, Oct 3, 21, 23:30, 3 Years ago
Thu, Mar 10, 22, 12:28, 2 Years ago
;