Announcement

Collapse
No announcement yet.

Groups and permissions

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

    Groups and permissions

    Wrestling with mysql (thread elsewhere), I find I cannot view /var/lib/mysql as user. Viewing it with sudo shows that all files have owner and group as "mysql." Yet in System Settings/User Manager, I made sure that the list of my Secondary Groups includes "mysql".

    Shouldn't this allow me to view and change permissions of files owned by "mysql"?

    I'm no "new guy" but feel like one frequently. This has got to be a pretty basic question, fundamentally about the meaning of a user's membership in various groups.

    Oops, forgot Snowhog's request. Lucid 10.04.1, KDE 4.5.1. I don't imagine the other stuff (CPU, video card, etc.) is relevant.
    -- Werdigo49
    Registered Linux User #291592
    Kubuntu Xenial Xerus (16.04)

    #2
    Re: Groups and permissions

    http://computingtech.blogspot.com/20...tu-groups.html

    You can check to see what groups the system has you in by using
    groups youraccountname
    and what members are in a specific group by using
    members groupname

    (You may have to "sudo apt-get install members" in order to use it.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Groups and permissions

      Interesting. On my 8.04 LAMP server, I can view all the files in /var/lib/mysql. However, I installed mysql in /var/www/mysql/ and, as a regular user, I can see all those files as well. They are indeed of group and ownership "mysql", but I have no such group set up. I do however, belong to "www" as does root.

      Could it be something in your /etc/apparmor.d/usr.sbin.mysqld file? It should have a couple of lines similar to the following:
      Code:
       /var/lib/mysql/ r,
       /var/lib/mysql/** rwk,
      If the "r" is not there, then you can't read.



      Comment


        #4
        Re: Groups and permissions

        Thanks, GreyGeek and Ole Juul! "groups john" shows "mysql" among them, and "members mysql" (after installing it... thanks again!) shows "mysql john". An examination of /etc/apparmor.d/usr.sbin.mysqld shows exactly what you have, Juul: r and rwk.

        BTW, with Dolphin open and /var/lib/mysql selected (an empty pane with a red "cannot enter /var/lib/mysql" at the bottom), when I used Konsole to change ownership of its files to "john" the file list instantly appeared in the Dolphin pane. Wonder what's going on with "mysql"!

        EDIT: After that experiment, I changed the ownership back to "mysql." Dolphin is NOW allowing me (user) to access directories (such as /var/lib/mysql) owned and grouped by "mysql." Guess the mysterious gremlins inside this box changed their minds... why the change is a puzzle to me, but it's what I wanted, so I guess it's OK.
        -- Werdigo49
        Registered Linux User #291592
        Kubuntu Xenial Xerus (16.04)

        Comment

        Working...
        X