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

Thread: lost permissions after zypper patch

  1. #1
    Join Date
    Apr 2012
    Location
    Philippines
    Posts
    218

    Default lost permissions after zypper patch

    I just ran a zypper patch on my openSUSE 12.4 KDE 4.10 desktop. Immediately following, in my pictures directory, I lost my user privileges to enter every sub-directory. So I changed to root and ran a chown -R george:users on that directory, to try and fix it, and when looking at the ls listing for that directory, this is what comes up after the change:

    Code:
    george@tribaltrekker:~/Pictures> ls -l | grep drw
    drw-r--r--   2 george users      4096 Sep  8  2011 airplanetemp
    drw-r--r--   4 george users      4096 Jan 13  2012 aliciaslideshow
    drw-r--r--   6 george users      4096 Sep  2  2012 ChronPicDisk
    drw-r--r--   2 george users      4096 Jan 24  2012 Copper
    drw-r--r--   2 george users      4096 Jun 24 07:09 CulturalPoints
    drw-r--r--   3 george users      4096 Aug 27  2011 family pics
    drw-r--r--  15 george users      4096 Sep  8  2012 FamMovPicsPalali
    drw-r--r--   2 george users      4096 Jan 13  2012 Fish Videos
    drw-r--r--   2 george users      4096 Mar 18  2012 HagiaSophia
    drw-r--r--   2 george users      4096 Oct 10  2011 Hause house
    drw-r--r--   3 george users      4096 Sep  2  2012 My Scans
    drw-r--r--   2 george users      4096 Sep  2  2012 New folder
    drw-r--r--   2 george users      4096 Aug 28  2011 OlsonPalawan
    drw-r--r--   2 george users     16384 Jun 24  2012 palawano
    drw-r--r--   2 george users    135168 Jun 24 07:05 Palawano All
    drw-r--r--   4 george users      4096 Sep  2  2012 Picasa
    drw-r--r--   4 george users      4096 Jan 13  2012 prayer cards
    drw-r--r--   7 george users      4096 Sep 23  2006 SarNAbbyPics
    drw-r--r-- 214 george users     16384 Sep 14 10:59 SavedPictures
    drw-r--r--   2 george users      4096 Jun 19 14:00 signs
    drw-r--r--   2 george users      4096 May 14  2012 smplayer_screenshots
    drw-r--r--   2 george users      4096 Jan 15  2013 techpics
    drw-r--r--   2 george users     20480 Jun 24 07:08 ToTablet
    drw-r--r--   3 george users     12288 Sep 20 09:30 WallPaperPhotos
    drw-r--r--   2 george users      4096 Nov  1  2011 Webcam
    So even though it says that I am the owner and should be able to enter any of these subdirectories, I cannot - it always says "permission denied." I also double-checked yast to make sure there are not 2 owners named "george", and there is only one. I also ran "whoami" to make sure that I am the one trying to get in, and it is only me here, george.

    This only seems to be a problem for the pictures directory sub-directories, as all my other directories and sub-directories in my home folder I still have access to. I tried to log out, and also when that didn't fix it, I tried to reboot. Nothing doing - it still will not let me enter those sub-directories.

    I was able, however, to enter those sub-directories as root, and I am able to see the files without a problem. I am able to open them from the command line using gimp and view the pictures. So it is not as though the directory was erased in some strange way.

    You can see also here below that my ownership and permissions are correct for the directory in question:
    Code:
    george@tribaltrekker:~> ls -l Pictures
    lrwxrwxrwx 1 george users 27 Apr  8 12:17 Pictures -> /georgedata/george/Pictures
    george@tribaltrekker:~> ls -l /georgedata/george/ | grep Pictures
    drwxr-xr-x  27 george users      4096 Sep 14 11:02 Pictures

    Here is the list of patches that I ran today just before the problems started happening from my zypper history. I have not done anything else unusual.
    Code:
    tribaltrekker:/var/log/zypp # cat history | grep 09-24
    2013-09-24 14:19:01|install|flash-player|11.2.202.310-2.36.1|x86_64||non-OSS update|d1d86698110d5a9ccd2a19dfe1814d08fb3d5688|
    2013-09-24 14:19:01|install|flash-player-kde4|11.2.202.310-2.36.1|x86_64||non-OSS update|fb344e978090c0ccfe1b1b8d4a37dc5cddec9349|
    2013-09-24 14:19:02|install|libnm-util2|0.9.6.4-5.16.1|x86_64||repo-update|adfb3c089f446703772f6b74c0cffba7f0f4b096|
    2013-09-24 14:19:02|install|libpython2_7-1_0|2.7.3-10.8.1|x86_64||repo-update|dc2be68dfe185c2d22012ae3544f600a1d75531e|
    2013-09-24 14:19:02|install|libnm-glib4|0.9.6.4-5.16.1|x86_64||repo-update|a3015340d41dbae7dca4058693db7d09d3537a35|
    2013-09-24 14:19:03|install|libnm-glib-vpn1|0.9.6.4-5.16.1|x86_64||repo-update|27e04b2de53c3c7eb897db40ea3f1705311a8a02|
    2013-09-24 14:19:07|install|python-base|2.7.3-10.8.1|x86_64||repo-update|e814d6e7fcfe12f6c0db62dcc4e8fadb9232e8d7|
    2013-09-24 14:19:09|install|NetworkManager|0.9.6.4-5.16.1|x86_64||repo-update|c59f184b9d6a245a36d244f322143215aa8f9048|
    2013-09-24 14:19:10|install|python-xml|2.7.3-10.8.1|x86_64||repo-update|16e137fa7c91bf3588c1644a2778af64c7fb73ff|
    2013-09-24 14:19:10|install|python-tk|2.7.3-10.8.1|x86_64||repo-update|7bccd3580161d798aa82cf8e68b09e80ba5b0177|
    2013-09-24 14:19:13|install|python-devel|2.7.3-10.8.1|x86_64||repo-update|065f0b704f5f0b03a2c81346cf388430a83025fe|
    2013-09-24 14:19:14|install|python|2.7.3-10.8.1|x86_64||repo-update|28aef5c2be27936255d1451bfbc9a3618e80e4c9|
    I don't know which of these caused the problem - might it be the flash player update?

    In any case, how do I go back/revert so that I can continue to have access to my pictures?

    Also, I checked bugzilla and couldn't find an equivalent bug. But I am hesitant to file a bug report unless I know which package caused the permissions problem.

    Thanks in advance,


    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,581
    Blog Entries
    14

    Default Re: lost permissions after zypper patch

    Don't know what caused it, but my bet is that you want to change back to the proper permissions, i.e. 755 for folders, 644 for files. Here's how you do that (since you already chowned your homedir you can execute the commands as a user, no need for root permissions:

    to change all the directories to 755:


    Code:
        find /home/george -type d -exec chmod 755 {} \;
    to change all the files to 644:



    Code:
        find /home/george -type f -exec chmod 644 {} \;
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    grglsn NNTP User

    Default Re: lost permissions after zypper patch

    On 09/24/2013 04:16 PM, Knurpht wrote:
    >
    > Don't know what caused it, but my bet is that you want to change back to
    > the proper permissions, i.e. 755 for folders, 644 for files. Here's how
    > you do that (since you already chowned your homedir you can execute the
    > commands as a user, no need for root permissions:
    >
    > to change all the directories to 755:
    >
    >
    >
    > Code:
    > --------------------
    > find /home/george -type d -exec chmod 755 {} \;
    >
    >
    > --------------------


    Running this only on the Pictures directory, here is the result:
    Code:
    george@tribaltrekker:~> find ./Pictures -type d -exec chmod 755 {} \;
    george@tribaltrekker:~> cd Pictures/
    george@tribaltrekker:~/Pictures> ls -l | grep dr
    drw-r--r--   2 george users      4096 Sep  8  2011 airplanetemp
    drw-r--r--   4 george users      4096 Jan 13  2012 aliciaslideshow
    drw-r--r--   6 george users      4096 Sep  2  2012 ChronPicDisk
    drw-r--r--   2 george users      4096 Jan 24  2012 Copper
    drw-r--r--   2 george users      4096 Jun 24 07:09 CulturalPoints
    drw-r--r--   3 george users      4096 Aug 27  2011 family pics
    drw-r--r--  15 george users      4096 Sep  8  2012 FamMovPicsPalali
    drw-r--r--   2 george users      4096 Jan 13  2012 Fish Videos
    drw-r--r--   2 george users      4096 Mar 18  2012 HagiaSophia
    drw-r--r--   2 george users      4096 Oct 10  2011 Hause house
    drw-r--r--   3 george users      4096 Sep  2  2012 My Scans
    drw-r--r--   2 george users      4096 Sep  2  2012 New folder
    drw-r--r--   2 george users      4096 Aug 28  2011 OlsonPalawan
    drw-r--r--   2 george users     16384 Jun 24  2012 palawano
    drw-r--r--   2 george users    135168 Jun 24 07:05 Palawano All
    drw-r--r--   4 george users      4096 Sep  2  2012 Picasa
    drw-r--r--   4 george users      4096 Jan 13  2012 prayer cards
    drw-r--r--   7 george users      4096 Sep 23  2006 SarNAbbyPics
    drw-r--r-- 214 george users     16384 Sep 14 10:59 SavedPictures
    drw-r--r--   2 george users      4096 Jun 19 14:00 signs
    drw-r--r--   2 george users      4096 May 14  2012 smplayer_screenshots
    drw-r--r--   2 george users      4096 Jan 15  2013 techpics
    drw-r--r--   2 george users     20480 Jun 24 07:08 ToTablet
    drw-r--r--   3 george users     12288 Sep 20 09:30 WallPaperPhotos
    drw-r--r--   2 george users      4096 Nov  1  2011 Webcam
    So you see they are all the owner "george"

    >
    >
    > to change all the files to 644:
    >
    > Code:
    > --------------------
    > find /home/george -type f -exec chmod 644 {} \;
    >
    >
    > --------------------


    So now I enter the Pictures directory, and I run the following, with
    this result:
    Code:
    george@tribaltrekker:~/Pictures> find . -type f -exec chmod 644 {} \;
    ..
    ..
    ..
    chmod: cannot access ‘./ToTablet/DSCN1117.jpg’: Permission denied
    chmod: cannot access ‘./ToTablet/DSCN0369.JPG’: Permission denied
    chmod: cannot access ‘./ToTablet/P1010017.JPG’: Permission denied
    chmod: cannot access ‘./ToTablet/IMG_4585.jpg’: Permission denied
    chmod: cannot access ‘./ToTablet/DSCN1446.JPG’: Permission denied
    chmod: cannot access ‘./ToTablet/2011-12-01_12-12-50.jpg’: Permission denied
    ..
    ..
    ..
    And there are thousands of those "permission denied" notices, because no
    matter how many times or ways I try and execute the command "chmod" or
    "chown", it simply does not change the owner, or the permissions, or both.

    The complicating factor is that my system indicates that the ownerships
    and permissions are changed and that I SHOULD have access, but I don't.

    If I look at every single one of those files that have "permission
    denied" above, you can see here what my system indicates are the true
    ownerships and permissions. I had to go in as root to show this, and I
    only picked specifically the same files as above to make it clear:

    Code:
    tribaltrekker:/home/george/Pictures/ToTablet # ls -l DSCN1117.jpg
    DSCN0369.JPG P1010017.JPG IMG_4585.jpg DSCN1446.JPG 2011-12-01_12-12-50.jpg
    -rw-r--r-- 1 george users 237676 Dec 13  2012 2011-12-01_12-12-50.jpg
    -rw-r--r-- 1 george users 308940 Dec 13  2012 DSCN0369.JPG
    -rw-r--r-- 1 george users 489576 Dec 13  2012 DSCN1117.jpg
    -rw-r--r-- 1 george users 117309 Dec 13  2012 DSCN1446.JPG
    -rw-r--r-- 1 george users 412861 Dec 13  2012 IMG_4585.jpg
    -rw-r--r-- 1 george users 287727 Dec 13  2012 P1010017.JPG
    There it is. It says I have the privilege of entering the directory and
    viewing those files, but I can only enter and view those files as root,
    and if I try and change the ownership and permissions, even as root, it
    doesn't change anything.


    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,581
    Blog Entries
    14

    Default Re: lost permissions after zypper patch

    That's because you did not change the perms of ~/Pictures itself. Please also show output of
    Code:
    ls -ld /home/george
    and
    Code:
    ls -ld /home/george/Pictures
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5
    grglsn NNTP User

    Default Re: lost permissions after zypper patch

    On 09/24/2013 05:06 PM, Knurpht wrote:
    >
    > That's because you did not change the perms of ~/Pictures itself. Please
    > also show output of
    >
    > Code:
    > --------------------
    > ls -ld /home/george
    > --------------------
    > and
    >
    > Code:
    > --------------------
    > ls -ld /home/george/Pictures
    > --------------------
    >
    >


    Code:
    tribaltrekker:/home/george # ls -ld /home/george
    drwxr-xr-x 70 george users 4096 Sep 24 16:46 /home/george
    tribaltrekker:/home/george # ls -ld /home/george/Pictures
    lrwxrwxrwx 1 george users 27 Apr  8 12:17 /home/george/Pictures ->
    /georgedata/george/Pictures
    tribaltrekker:/home/george # ls -ld /georgedata/george/Pictures
    drwxr-xr-x 27 george users 4096 Sep 14 11:02 /georgedata/george/Pictures
    Either I am blind and am not seeing something that is totally obvious,
    or there is something very wrong.

    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,581
    Blog Entries
    14

    Default Re: lost permissions after zypper patch

    Quote Originally Posted by grglsn View Post
    Code:
    tribaltrekker:/home/george # ls -ld /home/george
    drwxr-xr-x 70 george users 4096 Sep 24 16:46 /home/george
    tribaltrekker:/home/george # ls -ld /home/george/Pictures
    lrwxrwxrwx 1 george users 27 Apr  8 12:17 /home/george/Pictures ->
    /georgedata/george/Pictures
    tribaltrekker:/home/george # ls -ld /georgedata/george/Pictures
    drwxr-xr-x 27 george users 4096 Sep 14 11:02 /georgedata/george/Pictures
    Either I am blind and am not seeing something that is totally obvious,
    or there is something very wrong.

    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB
    OK, we're getting somewhere. I see now that ~/Pictures is a symlink. Now please show the output of
    Code:
    ls -ld /georgedata && ls -ld /georgedata/george && ld -ld /georgedata/george/Pictures
    cat /etc/fstab | grep georgedata
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    grglsn NNTP User

    Default Re: lost permissions after zypper patch

    On 09/24/2013 06:16 PM, Knurpht wrote:
    >
    >
    > Code:
    > --------------------
    >
    > ls -ld /georgedata && ls -ld /georgedata/george && ld -ld /georgedata/george/Pictures
    > cat /etc/fstab | grep georgedata
    >
    > --------------------
    >
    >

    Code:
    george@tribaltrekker:~>  ls -ld /georgedata && ls -ld /georgedata/george
    && ls -ld /georgedata/george/Pictures
    drwxr-xr-x 5 root root 4096 Jun 25 09:13 /georgedata
    drwxr-xr-x 109 george users 4096 Apr 19 16:38 /georgedata/george
    drwxr-xr-x 27 george users 4096 Sep 14 11:02 /georgedata/george/Pictures
    george@tribaltrekker:~> cat /etc/fstab | grep georgedata
    LABEL=home           /georgedata                ext4
    acl,user_xattr        1 2
    #LABEL=nhome123cfg    /georgedata               ext4
    acl,user_xattr        1 2
    Funny thing is, none of these configurations changed. The only thing
    that I did differently was the zypper patch, and after that is when I
    noticed I did not have any access to the Pictures sub-directories.

    If something happened before I did zypper patch, I don't know what it
    could have been.

    Why pictures, I wonder? the zypper patch had some updates to glib, flash
    player, and python. The only thing that had access to the pictures was
    that I had as my KDE desktop a slideshow from the
    /Pictures/WallPaperPhotos directory, and a KDE photo widget that
    randomly selected pictures for display, changing every few minutes, from
    all the sub-directories in /Pictures/.

    It seems that my system thinks that these sub-directories are root owner
    and root permissions, but the display from ls shows them to be george:user.

    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

  8. #8
    grglsn NNTP User

    Default Re: lost permissions after zypper patch

    On 09/24/2013 06:29 PM, grglsn wrote:
    > On 09/24/2013 06:16 PM, Knurpht wrote:
    >>
    >>
    >> Code:
    >> --------------------
    >>
    >> ls -ld /georgedata && ls -ld /georgedata/george && ld -ld /georgedata/george/Pictures
    >> cat /etc/fstab | grep georgedata
    >>
    >> --------------------
    >>
    >>

    >
    Code:
    > george@tribaltrekker:~>  ls -ld /georgedata && ls -ld /georgedata/george
    > && ls -ld /georgedata/george/Pictures
    > drwxr-xr-x 5 root root 4096 Jun 25 09:13 /georgedata
    > drwxr-xr-x 109 george users 4096 Apr 19 16:38 /georgedata/george
    > drwxr-xr-x 27 george users 4096 Sep 14 11:02 /georgedata/george/Pictures
    > george@tribaltrekker:~> cat /etc/fstab | grep georgedata
    > LABEL=home           /georgedata                ext4
    > acl,user_xattr        1 2
    > #LABEL=nhome123cfg    /georgedata               ext4
    > acl,user_xattr        1 2
    >
    >
    > Funny thing is, none of these configurations changed. The only thing
    > that I did differently was the zypper patch, and after that is when I
    > noticed I did not have any access to the Pictures sub-directories.
    >
    > If something happened before I did zypper patch, I don't know what it
    > could have been.
    >
    > Why pictures, I wonder? the zypper patch had some updates to glib, flash
    > player, and python. The only thing that had access to the pictures was
    > that I had as my KDE desktop a slideshow from the
    > /Pictures/WallPaperPhotos directory, and a KDE photo widget that
    > randomly selected pictures for display, changing every few minutes, from
    > all the sub-directories in /Pictures/.
    >
    > It seems that my system thinks that these sub-directories are root owner
    > and root permissions, but the display from ls shows them to be george:user.
    >


    I just tried one more thing, and it also did not work. I created a new
    user, "test". Then as root, I recursively changed the ownership of one
    one of the directories,
    ~/Pictures/airplanetemp
    to ownership of test:users.

    Then I logged out as george, and logged in as test. I went to that
    directory and tried to enter it (using the "cd" command), and I got the
    same thing: Permission denied.

    --
    G.O.
    Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | 16GB
    Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | 4GB
    Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | 8GB

  9. #9
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,581
    Blog Entries
    14

    Default Re: lost permissions after zypper patch

    The one thing I can think of at this moment, is to do a
    Code:
    chown george:users /georgedata/* -R
    BTW. My extra partitions have "defaults" as fstab option, please also post output of
    Code:
    mount
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  10. #10

    Default Re: lost permissions after zypper patch

    Quote Originally Posted by Knurpht View Post
    BTW. My extra partitions have "defaults" as fstab option, please also post output of
    Code:
    mount
    AFAIK the options "acl" and "user_xattr" are now default for ext4, so it should make no difference if they are specified or not.

    And according to the OP's last directory listing, there are no ACL's there anyway that could cause this (they would show up as '+' in ls's output).

    Quote Originally Posted by grglsn View Post
    On 09/24/2013 06:29 PM, grglsn wrote:
    I just tried one more thing, and it also did not work. I created a new
    user, "test". Then as root, I recursively changed the ownership of one
    one of the directories,
    ~/Pictures/airplanetemp
    to ownership of test:users.

    Then I logged out as george, and logged in as test. I went to that
    directory and tried to enter it (using the "cd" command), and I got the
    same thing: Permission denied.
    Did you set the 'x' flag for that directory ("chmod +x ~/Pictures/airplanetemp", maybe as root if needed)?
    That's needed for entering the directory and those 'x' flags were _not_ set in the last listing you posted.

    Have you tried to enter the directory as root?
    If you get "Permission denied" then as well, this is most likely caused by an inconsistent filesystem.
    You should run fsck in that case.

Page 1 of 2 12 LastLast

Posting Permissions

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