LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2016, 06:31 PM   #1
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Rep: Reputation: Disabled
Exclamation kgpg program not working properly, gpg is also a mess at the terminal.


Hey good people of Linuxquestions.org I am facing another problem today and need some help...

upon running sudo kgpg at the terminal I receive the output:

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Error: "/var/tmp/kdecache-,myname" is owned by uid 1000 instead of uid 0.
kgpg(3521)/kdeui (KIconLoader): Error: standard icon theme "oxygen" not found!

kgpg(3521) GnupgBinary::setBinary: checking version of GnuPG executable "gpg"
kgpg(3521) GnupgBinary::setBinary: version is "1.4.16" 66576
kgpg(3521): Couldn't start knotify from knotify4.desktop: "KLauncher could not be reached via D-Bus. Error when calling start_service_by_desktop_path:
The name org.kde.klauncher was not provided by any .service files
"

kgpg(3521)/kdeui (KNotification) KNotification::slotReceivedIdError: Error while contacting notify daemon "The name org.kde.knotify was not provided by any .service files"


I also get a GUI box that says

gpg: option file `/home/myname/.gnupg/gpg.conf': No such file or directory

if i make the gpg.conf file then it tells me the permissions are not correct, if I delete it gpg or kgpg does not bother to generate a new one. I am getting frustrated because I use gpg terminal commands almost daily. I have tried reinstalling kgpg but i will not reinstall gpg as it is so important apt will probably stop working. Can someone tell me what I should do? I desperately need gpg to work. What are the proper permissions for the gpg.conf file? Can I get one off the web if my program wont generate one?
 
Old 04-26-2016, 04:07 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
/home/myname/.gnupg/gpg.conf should be owned by the user (myname) that has that home directory. Only that user should have permissions for .gnupg and .gnupg/gpg.conf under the home. Permissions for .gnupg should be 700 (rwx-------) and for .gpg.conf 500 (rw-------). You should also insure no one else has write permissions for the home directory above .gnupg.
 
Old 04-27-2016, 11:31 AM   #3
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
I was able to do the permission changes for .gnupg directory and the gpg.conf file but I do not know how to make a directory solely a users. There are only two users on my system, me and root and I use both. Is there a way to use chown to exclude root since the directory can only be owned by the user itself?
 
Old 04-27-2016, 02:05 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
You use chown to set the user on directory just as you do on a regular file e.g. "chown <user>:<group> <directory". You use chmod to set permissions. Doing "chmod 755 <directory>" will make it wwritable by the user but readable by everyone else which is OK.

You don't have to exclude root (and can't without some work). The root user is the "superuser" so can do most things that would otherwise be blocked. My comment about other users should have said "other non-root users".

Last edited by MensaWater; 04-27-2016 at 04:08 PM.
 
Old 04-28-2016, 11:48 AM   #5
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
I'm started to get really annoyed. I figured out how to make every directory and sub-directory owned by my user name with chown -R myname:myname myname/ and I see the correct permissions and it's STILL telling me there is something wrong with the permissions. This is driving me crazy!!! I've tried reinstalling kgpg but it still gives me the damn error, and uninstalling gnupg is insane. Thanks for the help so far!
 
Old 04-28-2016, 12:47 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Quote:
Error: "/var/tmp/kdecache-,myname" is owned by uid 1000 instead of uid 0.
Are you still getting that error? Did you do "ls -l /var/tmp/kdecache-,myname" to see what that file has for permissions?
 
Old 04-29-2016, 09:19 AM   #7
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
I did here is what the output to the command was:

-rw-r--r-- 1 myname myname 10547304 Apr 28 12:25 icon-cache.kcache
 
Old 04-29-2016, 11:08 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Quote:
Originally Posted by deadstar32 View Post
-rw-r--r-- 1 myname myname 10547304 Apr 28 12:25 icon-cache.kcache
The error says that should be owned by root rather than myname (root = UID 0, myname presumably = UID 1000).

As root try doing "chown root icon-cache.kcache" then retest to see if anything changes. If not then try "chown root:root" on the file and retest.
 
Old 04-29-2016, 11:46 AM   #9
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
I tried both but alas, neither are working. Is there a way to specify the uid with the chown command? I've checked the man pages but nothing on uid comes up. If i knew a command i'd set it to uid 1000.

Last edited by deadstar32; 04-29-2016 at 11:47 AM. Reason: spelling
 
Old 04-29-2016, 02:03 PM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
chown is actually putting the UID on the file even when you specify the name. The name is found in /etc/passwd and has the uid. If you removed the name (which you shouldn't do for "root") from /etc/passwd you'd see a file that displayed name for owner would now display the UID instead.

Having said that, yes you can specify UID rather than name. That is "chown 0" works as well as "chown root".

Some people do make alternate users have uid 0 so they have root permission (a bad idea for many reasons). If you do command to look for that you would see them:
grep :0: /etc/passwd
Look at entries that have that 0 in the 3rd colon delimited field. Ideally you only have the user named "root" similar to this:
root:x:0:0:root:/root:/bin/bash

Note that other users will have 0 in the 4th colon field which is OK (usually).

Are you saying when you did the chown of the file it didn't change it to root? Or are you saying you still got the same error complaining about UID 0 and UID 1000?
 
Old 05-01-2016, 02:15 PM   #11
deadstar32
LQ Newbie
 
Registered: Feb 2016
Posts: 26

Original Poster
Rep: Reputation: Disabled
What I am trying to say was I received the same error that I posted originally. The same output that I posted in the very first post of this thread is the same output I see at my terminal as of this latest post. Thank you for the help thus far!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Destructor not working properly with (double)** pointer ?? program output not appropiate Mridulj Programming 8 11-03-2014 01:55 AM
gpg-kgpg-kleopatra-gpa suddenly broken unclejed613 Slackware 1 10-26-2011 12:03 PM
Simple C# program using mono not working properly Shh226 Programming 12 05-20-2010 04:25 AM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 10:37 AM
shredder kgpg not working WOP1337 Linux - Software 2 04-05-2007 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration