Announcement

Collapse
No announcement yet.

Home directory ownership

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Home directory ownership

    I've just had several file ownership warnings on a fresh installation of 9.04 AMD64. The errors all related to files under home/lee/.kde/share/config/

    Specific files were ksmserverrc, kdedrc, khotkeysrc.

    The error message stated that the those files were not writeable so, after a search to make sure I could chown these files, I recursively specified myself as the owner of all files under the .kde directory. Now I'm wondering, should I do the same for all files under "home/lee" e.g should I chown -R 755 lee home/lee or will this cause problems within Kubuntu?

    I suppose another question is, which directories and files should be chowned to me?

    #2
    Re: Home directory ownership

    this is pretty easy.
    files in a user's home directory belong to that user.
    the following command, run by a user in its home directory, should always return null.
    Code:
    find . ! -user $USER -print
    hth
    gnu/linux is not windoze

    Comment


      #3
      Re: Home directory ownership

      Originally posted by ultrageeky
      chown -R 755 lee home/lee
      I think you are mixing up chown (change ownership) and chmod (change permissions) commands with that... 755 is a permission mode for chmod.

      It is generally safe to change ownership to user recursively in your home folder, but I'd not recommend changing permissions recursively (unless you really know what you're doing), as there can be files there that are not meant to be world readable (like ssh private keys, as an example).

      Also, 755 will set everything executable, which is usually not what you want.

      Usually fixing ownership to user is enough to solve any permission problems (due to ownership changed to root)...and there is no need to touch permissions.

      Comment


        #4
        Re: Home directory ownership

        Or you use your file manager like Dophin or Konqueror, right click on your home directory, select properties and follow some logic

        Comment


          #5
          Re: Home directory ownership

          You're right Kubicle, I'd meant to write chown -R lee home, I don't know why I'd added the 755. For some reason I keep loosing ownership of my home directory to root. I'll keep fighting for control of it and hopefully Kubuntu'll give up

          Thanks for that info Jankushka. I've written it into my book (a folded sheet of A4) for future reference.

          Teunis, doesn't always work without running Dolphin with root privileges; I've suffered that problem when changing ownership of hdd's exclusive of the installation drive.

          Comment


            #6
            Re: Home directory ownership

            Originally posted by ultrageeky
            For some reason I keep loosing ownership of my home directory to root. I'll keep fighting for control of it and hopefully Kubuntu'll give up
            the lsof command might help here...
            try start a konsole and enter
            Code:
            lsof +D ~
            this is the list open files command.
            the +D will have the command look up the given directory and all its files recursively.
            the given directory is ~ which stands for the user issuing the command's home directory.
            it'll tell you what's keeping what files open (can be a pretty long list).
            that might help debug your issue.
            hopefully.
            gnu/linux is not windoze

            Comment

            Working...
            X