Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Home folder permissions issues after update

  1. #1
    Join Date
    Feb 2017
    Beans
    7

    Home folder permissions issues after update

    After successfully upgrading 19 something to 19.1 many applications seem to be having permission issues. Opening an app file, like Kodi now has everything locked which was not the case before upgrading. This is throughout my /home folder. I feel like I've read about this happening before and hope someone knows what the commands are to fix the folder permissions if that is what the issue is. Thanks in advance for any help.
    error.png

  2. #2
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    7,354
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Home folder permissions issues after update

    The two common causes for applications not being able to read/write in directories in your home folder are:

    1) You've been running graphical programs as root and that's messed up your ownership. Don't do that.

    2) The application you're running is a snap, and it's been sandboxed from being able to read/write other than in specific directories.

    You'll probably already know which of these is likely to be the case on your system.

  3. #3
    Join Date
    Feb 2017
    Beans
    7

    Re: Home folder permissions issues after update

    Thanks, but neither fits my situation. Kodi, as an example but not limited to this one program, was initially installed with the software manager in the dash of ubuntu before the upgrade. Worked like a champ. Never needed root for it, never used root for it. After the update the files show as previously pictured and the program will not start.

    $ kodi
    Could not init logging classes. Log folder error (/home/username/.kodi/temp/)
    ERROR: Unable to create application. Exiting

    It will run if I
    $ sudo kodi
    but that's not ideal.

    This is after removing and purging to reinstall.

  4. #4
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    7,354
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Home folder permissions issues after update

    Quote Originally Posted by wmsfoeva View Post
    Thanks, but neither fits my situation.
    The first one means doing this:

    It will run if I
    $ sudo kodi
    That will make all the configuration files in your home folder be owned by root. Which breaks stuff, and means that you can no longer use that application as not-root.

    This is after removing and purging to reinstall.
    Removing packages does absolutely nothing to configuration files in users' home folders.

    So, it sounds very much like you've done number 1.

    You'll need to change the ownership of those files (and any others that you've broken by running graphical applications as root) back to your user. In future if you need to run graphical applications as root (which you don't) you should use
    Code:
    pkexec <application>
    or
    Code:
    sudo -H <application>
    to break fewer things.
    None but ourselves can free our minds

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Home folder permissions issues after update

    What does these show?
    ls -l ~/.kodi/temp/
    ls -l ~/.kodi

    I would expect files to be 664 and folders to be 775 as those are defaults. Unless required to be executable by kodi.
    http://ubuntuforums.org/showthread.php?p=12181259
    https://help.ubuntu.com/community/FilePermissions
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    10,844
    Distro
    Ubuntu

    Re: Home folder permissions issues after update

    Thanks, but neither fits my situation. Kodi, as an example but not limited to this one program,
    so what other programs are affected?
    Is it only a few others or are all programs affected?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    18,809
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Home folder permissions issues after update

    To set all the file ownership inside the current userid's HOME back, assuming all sorts of ubuntu specific things, run
    Code:
    sudo chown -R  $LOGNAME:$LOGNAME $HOME
    that has been corrected thanks to Yeti's sharp eye.

    That shouldn't do any harm and should fix stuff.

    Don't use sudo to run any GUI programs. At least not before learning and understanding normal Unix file permissions.

    Previously, this post had the incorrect:
    sudo chown -R $LOGNAME:LOGNAME $HOME
    it is missing a required $.
    Last edited by TheFu; 1 Week Ago at 03:41 AM.

  8. #8
    Join Date
    Feb 2015
    Beans
    Hidden!
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Home folder permissions issues after update

    Quote Originally Posted by TheFu View Post
    ...
    Code:
    sudo chown -R  $LOGNAME:LOGNAME $HOME
    ...
    I'm thinking for that code to work the second "LOGNAME" should also have a "$" symbol before it or the group will be named "LOGNAME" rather than the shell expanding it to the users actual logname.

    It appears to be a simple typo/omission that I'd normally send another user a PM to correct it themselves; except when PMs are turned off of course ...
    Code:
    sudo chown -R  $LOGNAME:$LOGNAME $HOME
    Regards, yeti.

    Edit: @TheFu, I also notice there is a double spacing before the first "$LOGNAME". Not sure if that will cause any problem, just to bring it to your attention in case it does. I suspect the missing $ symbol is more important for the OP.
    Last edited by yetimon_64; 1 Week Ago at 02:43 AM. Reason: gr. & noted double spacing in command

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    18,809
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Home folder permissions issues after update

    Correct! Most definitely a typo on my part. I'll correct above to limit confusion.

    Spacing of options in the shell seldom matters, provided there is at least 1 space where needed and no-spaces where not allowed.
    Code:
    sudo        chown           -R           $LOGNAME:$LOGNAME         $HOME
    is perfectly fine. Some others here seem to put the -R last. I'd never seen that before in 25 yrs, but if the command doesn't care, why not? The only reason a command might care is when multiple path options are provided.

    There is a certain order for options I've come to expect with CLI tools.

    Code:
    command      options/switches     switch+arguments       paths-to-files/directories
    From the chmod manpage:
    Code:
           chown [OPTION]... [OWNER][:[GROUP]] FILE...
    -R is an option.
    OWNER:GROUP is filled in by $LOGNAME:$LOGNAME
    FILE is provided my $HOME

    The examples section of the manpage shows the order I use. But whatever works, works.
    Last edited by TheFu; 1 Week Ago at 03:48 AM.

  10. #10
    Join Date
    Feb 2017
    Beans
    7

    Re: Home folder permissions issues after update

    Thanks for everyone's help so far. I've been out of town and just got back to this box. To clarify, I don't open GUIs as sudo as a regular rule. When it was mentioned earlier I tried it, hence knowing kodi opens using sudo. I mentioned kodi was not the only program I had permission issues with, just an easy example. To answer all earlier questions, here is the output of those commands and the offered solution. After execution of the command I tried to open libreoffice which I had not touched since upgrading. I was greeted with this...
    Screenshot_2020-02-14_18-01-28.png

    I have not issued sudo on this program (or any other than kodi).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •