def fix_ownership
    return if Process.uid != 0
    begin
      uid = Etc.getpwnam("bixby").uid
      gid = Etc.getgrnam("bixby").gid
      # user/group exists, chown
      File.chown(uid, gid, Bixby.path("var"), Bixby.path("etc"))
    rescue ArgumentError
    end
  end
def fix_ownership
    return if Process.uid != 0
    begin
      uid = Etc.getpwnam("bixby").uid
      gid = Etc.getgrnam("bixby").gid
      
      File.chown(uid, gid, Bixby.path("var"), Bixby.path("etc"))
    rescue ArgumentError
    end
  end
def fix_ownership return if Process . uid != 0 begin uid = Etc . getpwnam ( "bixby" ) . uid gid = Etc . getgrnam ( "bixby" ) . gid # user/group exists, chown File . chown ( uid , gid , Bixby . path ( "var" ) , Bixby . path ( "etc" ) ) rescue ArgumentError end end
If running as root, fix ownership of var and etc dirs
If running as root fix ownership of var and etc dirs