LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't own home folder - no one can.... (http://www.linuxquestions.org/questions/linux-software-2/cant-own-home-folder-no-one-can-706902/)

jamwaffles 02-23-2009 02:06 PM

Can't own home folder - no one can....
 
hi all

i recently installed a free version of HI-TECHs picc compiler, and foolishly tried to install to my home directory as root when it did not work as planned. this has now made many files in /home/james owned either by root or no one. what i want to do is (rather obviously) take back ownership of my files :P. can anyone help me here please?

james waples

ps. output of ls -a -l

drwxrwx--- 151 james root 4096 2009-02-23 18:39 .
drwxrwxrwx 7 root root 4096 2009-02-09 17:50 ..
drwxrwx--- 2 root james 4096 2009-02-22 12:30 .AbiSuite
drwxrwx--- 3 james james 4096 2009-02-08 16:33 .adanaxis
drwxrwx--- 3 root james 4096 2009-02-08 14:23 .adobe
-rw-rw-r-- 1 root james 472 2009-02-14 19:41 .aeolus-presets
drwxrwx--- 2 james james 4096 2009-02-08 13:45 Album Covers
drwxrwx--- 9 root james 4096 2009-02-08 16:33 .amsn
drwxrwx--- 2 root james 4096 2009-02-14 19:38 amsn_received
drwxrwx--- 4 james james 4096 2009-02-08 16:33 .anjuta
drwxrwx--- 2 james james 4096 2009-02-08 16:33 .aptitude
drwxrwx--- 2 james james 4096 2009-02-08 16:33 .ardour2
drwxrwx--- 3 james james 4096 2009-02-08 14:23 .armyops250
drwxrwx--- 4 james james 4096 2009-02-15 15:53 .audacity-data
drwxrwx--- 2 james james 4096 2009-02-12 19:19 autosave
drwxrwx--- 4 root james 4096 2009-02-14 19:50 .ayttm
-rwxrw---- 1 james james 194381 2008-12-21 11:49 BabyTuxBlack.png
drwxrwxr-x 3 james james 4096 2009-02-09 20:08 Backup
-rw-rw---- 1 root james 11452 2009-02-23 08:24 .bash_history
-rw-rw---- 1 james james 220 2009-02-08 13:20 .bash_logout
-rw-rw---- 1 james james 3115 2009-02-08 13:20 .bashrc
drwxrwx--- 2 james james 4096 2009-02-08 16:33 .beryl
drwxrwx--- 7 james james 4096 2009-02-20 21:30 .blender
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .bluefish
-rw-rw-r-- 1 root james 47 2009-02-14 16:26 BrainOverflow.txt
-rw-rw-r-- 1 root james 0 2009-02-14 16:26 BrainOverflow.txt~
drwxrwx--- 4 james james 4096 2009-02-08 16:33 .bzf
drwxrwxr-x 7 james james 4096 2009-02-08 14:23 .cache
drwxrwx--- 2 james james 4096 2009-02-08 14:21 Capture
drwxrwx--- 2 root james 4096 2009-02-08 14:23 .cddb
drwxrwx--- 44 root james 4096 2009-02-20 15:24 .centerim
drwxrwx--- 12 root james 4096 2009-02-08 16:33 .cinepaint
-rwxrw---- 1 root james 1850 2009-02-08 12:03 client_state.xml
drwxrwx--- 4 james james 4096 2009-02-08 14:23 .codered
drwxrwx--- 3 james james 4096 2009-02-08 14:23 .compiz
drwxrwx--- 24 root james 4096 2009-02-14 19:37 .config
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .crack-attack
drwxrwx--- 2 root james 4096 2009-02-08 14:23 .critter
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .cups
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .dangen
drwxrwx--- 3 james james 4096 2009-02-08 13:25 .dbus
-rw-r--r-- 1 james james 60 2009-02-22 20:21 .DCOPserver_james-desktop__0
lrwxrwxrwx 1 james james 40 2009-02-22 20:21 .DCOPserver_james-desktop_:0 -> /home/james/.DCOPserver_james-desktop__0
drwxrwx--- 2 root james 4096 2009-02-08 14:23 .debtags
drwxrwxr-x 2 root james 4096 2009-02-20 10:00 Desktop
drwxrwx--- 5 root james 4096 2009-02-08 16:33 .dia
drwxrwx--- 4 james james 4096 2009-02-08 14:23 .distcc
-rw-rw---- 1 james james 28 2009-02-22 17:35 .dmrc
drwxrwxr-x 25 james james 4096 2009-02-22 19:39 Downloads
drwxrwx--- 15 root james 4096 2009-02-08 14:21 eagle
drwxrwx--- 10 root james 4096 2009-02-08 14:21 eagle-5.4.0
drwxrwx--- 2 james james 4096 2009-02-08 16:33 .easytag
-rwxrw---- 1 root james 128 2008-06-02 18:20 edid.bin
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .electricsheep
drwxrwx--- 4 root james 4096 2009-02-08 16:33 .emerald
-rw-rw---- 1 james james 16 2009-02-08 13:25 .esd_auth
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .etracer
drwxrwx--- 3 root james 4096 2009-02-08 16:33 .evolution
-rwxrw---- 1 root james 39963 2008-05-26 16:15 F876DEMO.LST
-rw-rw-r-- 1 root james 14340 2009-02-08 21:02 .face
drwxrwx--- 3 james james 4096 2009-02-08 14:23 .fltk
drwxrwx--- 2 root james 4096 2009-02-14 21:31 .fontconfig
drwxrwx--- 3 root james 4096 2009-02-08 16:33 .FontForge
drwxrwx--- 3 james james 4096 2009-02-08 14:23 .freecycle
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .freemind
drwxrwx--- 5 root james 4096 2009-02-18 10:36 .gaim
drwxrwx--- 5 james james 4096 2009-02-23 18:35 .gconf
drwxrwx--- 2 james james 4096 2009-02-23 18:51 .gconfd
drwxrwx--- 6 root james 4096 2009-02-08 16:33 .gdesklets
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .gEDA
drwxrwx--- 4 james james 4096 2009-02-08 14:23 .gegl-0.0
drwxrwx--- 21 root james 4096 2009-02-08 16:33 .gimp-2.2
drwxrwx--- 20 root james 4096 2009-02-08 16:33 .gimp-2.4
drwxrwx--- 21 james james 4096 2009-02-20 14:08 .gimp-2.6
-rw-rw---- 1 james james 0 2009-02-22 18:13 .gksu.lock
drwxrwx--- 2 root james 4096 2009-02-18 15:12 .gl-117
drwxrwx--- 6 root james 4096 2009-02-08 16:33 .gnome
drwxrwx--- 26 root james 4096 2009-02-23 08:23 .gnome2
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .gnome2_private
drwxrwx--- 5 root james 12288 2009-02-12 16:14 Gnome-media
drwxrwx--- 3 james james 4096 2009-02-08 16:33 .gnupg
drwxrwx--- 2 root james 4096 2009-02-08 14:24 .gpilotd
drwxrwxr-x 2 root james 4096 2009-02-08 17:53 .gstreamer-0.10
drwxrwxr-x 2 root james 4096 2009-02-18 10:07 .gstreamer-0.8
-rw-rw-r-- 1 root james 171 2009-02-23 08:18 .gtk-bookmarks
drwxrwx--- 2 root james 4096 2009-02-08 16:33 .gtodo
-rwxrw---- 1 james james 32 2008-07-05 11:15 gui_rpc_auth.cfg
drwxrwx--- 2 james james 4096 2009-02-08 16:33 .gunroar
dr-x------ 2 james james 0 2009-02-23 18:35 .gvfs
-rwxrw---- 1 james james 39645 2008-11-17 19:14 homer.jpg
drwxrwx--- 3 root james 4096 2009-02-08 16:33 .hydrogen
-rw------- 1 james james 9732 2009-02-23 18:35 .ICEauthority
drwxrwx--- 8 root james 4096 2009-02-08 16:33 .icons
drwxrwx--- 2 root james 4096 2009-02-08 16:34 .inkscape
drwxrwx--- 2 root james 4096 2009-02-08 16:34 .jamin
drwxrwx--- 4 root james 4096 2009-02-22 18:01 .java
drwxrwx--- 3 root james 4096 2009-02-08 16:34 .k3d
drwxrwx--- 5 root james 4096 2009-02-08 14:51 .kde
drwxrwx--- 4 root james 4096 2009-02-08 14:24 .kde4
-rwxrw---- 1 root james 67 2009-02-08 12:03 KEEEEEEYYY.txt
drwxrwxr-x 3 root james 4096 2009-02-15 19:37 .keep
drwxrwx--- 3 root james 4096 2009-02-08 14:24 .kpackage
drwxrwx--- 4 root james 4096 2009-02-08 16:34 .ktoon
drwxrwx--- 2 james james 12288 2009-02-08 16:34 .lastfm-cache
-rw-rw---- 1 root 500 5063 2009-02-02 04:34 licence.txt
drwxrwx--- 10 james james 4096 2009-02-23 19:04 .limewire
drwxrwxr-x 3 root james 4096 2009-02-14 21:32 LimeWire
drwxrwx--- 5 root james 4096 2009-02-08 14:21 Linux backup
drwxrwx--- 3 root james 4096 2009-02-08 16:34 .linuxmint
drwxrwx--- 3 james james 4096 2009-02-08 13:25 .local
drwxrwx--- 3 james james 4096 2009-02-08 14:25 .loki
drwxrwx--- 3 root james 4096 2009-02-08 14:25 .macromedia
drwxrwx--- 3 james james 4096 2009-02-08 14:25 .marble
drwxrwx--- 3 root james 4096 2009-02-08 16:35 .mcop
drwxrwx--- 3 root james 4096 2009-02-08 14:26 .metacity
drwxrwx--- 5 root james 4096 2009-02-08 16:35 .mozilla
drwxrwx--- 3 root james 4096 2009-02-08 16:35 .mozilla-thunderbird
drwxrwx--- 2 root james 4096 2009-02-08 16:35 .mplayer
drwxrwx--- 2 root james 4096 2009-02-08 14:21 Music
-rwxrw---- 1 root james 8610877 2008-05-14 19:34 mysterymountain4096x1024.png
drwxrwxr-x 3 root james 4096 2009-02-22 21:08 .nautilus
-rwxrw---- 1 root james 198330 2008-01-03 10:11 ndiswrapper-1.51.tar.gz
-rw-rw-r-- 1 root james 2268 2009-02-16 17:19 New document 1.2009_02_16_17_19_25.0
drwxrwx--- 3 james james 4096 2009-02-08 14:26 .nexuiz
-rwxrw---- 1 root james 2180992 2004-08-04 00:20 ntoskrnl.exe
drwxrwx--- 2 root james 4096 2009-02-08 16:35 .nvclock
-rwxrw---- 1 james james 15311226 2007-06-21 16:25 NVIDIA-Linux-x86-100.14.11-pkg1.run
drwxrwx--- 3 root james 4096 2009-02-08 16:35 .openarena
drwxrwx--- 3 james james 4096 2009-02-21 16:42 .openoffice.org2
drwxrwx--- 4 root james 4096 2009-02-08 14:26 .opensync-0.22
drwxrwx--- 12 root james 4096 2009-02-08 16:35 .opera
drwxrwx--- 4 root james 4096 2009-02-08 16:35 .orca
drwxrwx--- 2 root james 4096 2009-02-15 16:26 other pics
drwxrwx--- 2 root james 4096 2009-02-08 14:22 parallel
-rwxrw---- 1 root james 16138 2008-11-15 12:44 password.lst
-rwxrw---- 1 james james 14 2008-06-19 20:28 pcap.cap
drwxrwx--- 3 james james 4096 2009-02-08 16:35 .pcb
-rwxrw---- 1 root james 14 2008-06-19 20:28 phone.txt
drwxrwx--- 2 root james 4096 2009-02-08 14:26 .photoprint
drwxrwx--- 7 root james 4096 2009-02-08 14:22 Photos
drwxr-xr-x 10 james james 4096 2009-02-02 21:24 picc-18-pro_9.63PL2.4040-linux
drwxrwxr-x 10 root james 4096 2009-01-08 05:45 picc-std_9.60PL3.3862-linux
drwxrwx--- 6 james james 4096 2009-02-08 14:22 Pictures
drwxrwx--- 2 root james 4096 2009-02-08 16:35 .ppracer
-rw-rw---- 1 root james 675 2009-02-08 13:20 .profile
drwxrwx--- 16 james james 4096 2009-02-20 21:15 Projects
drwxrwx--- 2 james james 4096 2009-02-08 14:26 Public
drwxrwx--- 2 root james 4096 2009-02-08 16:35 .pulse
-rw-rw---- 1 james james 256 2009-02-08 13:25 .pulse-cookie
drwxrwx--- 6 james james 4096 2009-02-17 20:08 .purple
drwxrwxr-x 3 root james 4096 2009-02-08 20:37 .q3a
drwxrwx--- 2 root james 4096 2009-02-08 16:36 .qt
-rw-rw-r-- 1 root james 150427 2009-02-18 11:24 randomglass.png
-rw-rw---- 1 root james 329 2009-02-14 13:59 .recently-used
-rw------- 1 james james 72991 2009-02-23 18:39 .recently-used.xbel
drwxrwx--- 4 root james 4096 2009-02-08 14:27 .sane
drwxrwx--- 5 root james 4096 2009-02-22 12:30 School-stuff
drwxrwxr-x 3 james james 4096 2009-02-17 16:45 .scorched3d
drwxrwx--- 4 root james 4096 2009-02-08 16:36 .screenlets
drwxrwx--- 3 root james 4096 2009-02-08 16:36 .scribus
drwxrwx--- 2 root james 4096 2009-02-22 19:15 Scripts
-rwxrwxr-x 1 root 500 4932 2009-02-02 21:24 shell-install
drwxrwx--- 2 root james 4096 2009-02-08 16:36 .skel
drwxrwx--- 3 james james 4096 2009-02-08 14:26 soundfonts
drwxrwx--- 2 james james 4096 2009-02-08 16:36 .ssh
drwxrwx--- 2 root james 4096 2009-02-08 16:36 .stopmotion
drwxrwx--- 3 root james 4096 2009-02-08 16:36 .subversion
-rw-rw-r-- 1 root james 0 2009-02-08 13:27 .sudo_as_admin_successful
drwxrwx--- 2 root james 4096 2009-02-08 16:36 .supertuxkart
drwxrwx--- 2 james james 4096 2009-02-08 14:27 .synfig
drwxrwx--- 2 root james 4096 2009-02-08 16:36 .teamspeak2
drwxrwx--- 47 root james 4096 2009-02-10 19:59 .themes
drwxrwx--- 5 root james 4096 2009-02-08 14:27 .thumbnails
drwxrwx--- 4 james james 4096 2009-02-08 16:37 .tmsnc
drwxrwx--- 4 james james 4096 2009-02-08 14:27 .tomboy
drwxrwx--- 3 james james 4096 2009-02-08 16:37 .tremulous
drwxrwx--- 2 root james 4096 2009-02-08 16:37 .trigger
-rwxrw---- 1 root james 155253 2008-12-22 16:37 tux.gif
drwxrwx--- 2 root james 4096 2009-02-08 16:37 .update-manager-core
drwxrwx--- 2 root james 4096 2009-02-08 16:37 .update-notifier
-rwxrw---- 1 james james 50473 2008-12-20 15:06 urban_terror_icon_512.png
drwxrwx--- 8 james james 4096 2009-02-08 14:27 .vegastrike
drwxrwx--- 2 james james 4096 2009-02-08 14:27 .vegastrike-0.5.0
drwxrwx--- 8 root james 4096 2009-02-08 16:37 .vegastrike.4.x
drwxrwx--- 4 root james 4096 2009-02-08 16:37 .vlc
drwxrwx--- 2 root james 4096 2009-02-20 15:04 .wapi
drwxrwx--- 3 james james 4096 2009-02-08 14:27 .warsow
-rwxrw---- 1 root james 12705 2009-02-08 12:03 WG111v3.inf
-rwxrw---- 1 root james 277498 2009-02-08 12:03 wg111v3.sys
-rw-rw-r-- 1 root james 4 2009-02-14 20:14 .windows-label
drwxrwx--- 4 root james 4096 2009-02-22 19:27 .wine
-rw-rw---- 1 root james 124 2009-02-22 17:35 .Xauthority
drwxrwx--- 2 root james 4096 2009-02-08 16:37 .xine
drwxrwx--- 4 root james 4096 2009-02-08 16:37 .xmms
-rwxrw---- 1 root james 3574 2009-02-08 12:03 xorg.conf
-rw-rw-r-- 1 root james 129 2009-02-21 18:42 .xscreensaver-getimage.cache
-rw-r--r-- 1 james james 6249 2009-02-23 18:47 .xsession-errors
-rw-rw-r-- 1 james james 2350 2009-02-12 19:20 .zynaddsubfxXML.cfg


PLEASE ESCUSE ALL THE CRAP :P

weibullguy 02-23-2009 02:30 PM

As root...
Code:

chown -R james:james /home/james

gergely89 02-23-2009 07:46 PM

Just for the sake of completeness:
Quote:

chown -R james:james /home/james
and
Quote:

chown -R james.james /home/james
both will work

(I wasn't aware of the possible notation using ':' instead of '.' - there is always something to learn)

linux

jamwaffles 02-24-2009 11:54 AM

thanks very much to you both. is there anything wrong with typing 'chown -hR james /home/james' as i did?

thanks again

james

catkin 02-24-2009 12:34 PM

Quote:

Originally Posted by jamwaffles (Post 3455771)
thanks very much to you both. is there anything wrong with typing 'chown -hR james /home/james' as i did?

Hello James :)

Hopefully non of the directories and files under /home/james need(ed) different owner than james! I've just checked my own home directory and none did need a special ownership but YMMV.

The h option is safer (and arguably gives the more intuitive behaviour) than the suggested commands. Passing strange that it is not the default.

james rather than james:james will not make any functional difference given the groups on the files you listed because group permissions do not give james any permission it (you!) do not already have through the owner permissions. For tidiness sake you may want to run chown -hR james:james /home/james.

Best

Charles


All times are GMT -5. The time now is 01:04 AM.