LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 03-27-2006, 04:41 AM   #1
bewerley
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
Arrow gnupg. Was working now not. please help


gpg was working on my nobody user account but is not working now. i dont know whats happen. It works when i am logged in as the root user but i need it working for a web based form using the nobody account.

Whenever i try to run a gpg comand like gpg --list-keys its comes back with

gpg: can't open `/tmp/.gnupg/pubring.gpg'
gpg: keydb_search_first failed: file open error

also when i try to import a key:

gpg: can't open `/tmp/.gnupg/pubring.gpg'
gpg: keydb_get_keyblock failed: eof
gpg: no writable keyring found: eof
gpg: error reading `shop.asc': general error
gpg: import from `shop.asc' failed: general error
gpg: Total number processed: 0

but the files are there.

[nobody@srv1 .gnupg]$ ls
pubring.gpg random_seed secring.gpg

Is there any way to delete the .gnupg folder and create a new one? i am very confussed about what has happened.

thank you for any help

Last edited by bewerley; 03-27-2006 at 04:51 AM.
 
Old 03-27-2006, 05:07 AM   #2
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
Does user nobody have read permissions on the /tmp/.gnupg/pubring.gpg file (0444 or -r--r--r--)?

Does "nobody" have a key? If not you will have to generate one (check out gpg --help).
 
Old 03-27-2006, 05:47 AM   #3
bewerley
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,

I cant create a key it comes up with

no writable public keyring found: eof

heres what i get when i see the permissions

[nobody@srv1 ~]$ ls -l .gnupg
total 4
-rw------- 1 apache apache 0 Mar 23 10:35 pubring.gpg
-rw------- 1 nobody nogroup 600 Mar 27 13:29 random_seed
-rw------- 1 apache apache 0 Mar 23 10:35 secring.gpg

i am really new to linux, doe these permission look right? if not what should i change them to?

thanks
 
Old 03-27-2006, 07:53 AM   #4
bewerley
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
i think i have solved it thank you

Last edited by bewerley; 03-27-2006 at 07:59 AM.
 
Old 03-27-2006, 12:00 PM   #5
bewerley
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
ok its still not working, i can run the php script when in the termial as user nobody, but when i run the php from the web it comes back with permission errors

Warning: fopen(/tmp/7618ad6b9d154204f8cc84dedbf7862danca.asc): failed to open stream: No such file or directory in /srv/web/gpg/working5.php on line 28

Warning: filesize(): Stat failed for /tmp/7618ad6b9d154204f8cc84dedbf7862danca.asc (errno=2 - No such file or directory) in /srv/web/gpg/working5.php on line 30

Warning: fread(): supplied argument is not a valid stream resource in /srv/web/gpg/working5.php on line 30

Warning: fclose(): supplied argument is not a valid stream resource in /srv/web/gpg/working5.php on line 32

Warning: unlink(/tmp/7618ad6b9d154204f8cc84dedbf7862danca.asc): No such file or directory in /srv/web/gpg/working5.php on line 36

so it can right to the tmp folder, if tried chomd the files but it hasent worked. anybody any ideas

thank you
 
Old 03-28-2006, 01:22 AM   #6
bewerley
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
if anybody else has thi problem, which i am sure you wont
this site helped me

http://www.php4hosting.com/php_faq/local/65/
 
Old 03-28-2006, 04:01 AM   #7
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
gpg should create keys automatically when they are not existent. Try this:

$gpg --gen-key

Then you'll be guided through the process. The data is saved in the users home directory under ~/.gnupg/something. Notice the home part. For some reason your gpg looked for the key in /tmp. That shouldn't be. So make sure the user has a writeale home directory.
 
  


Reply



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
kMail and GnuPG OneManArmy Linux - Security 2 02-06-2005 02:16 PM
how do you use GnuPG Robin01 Linux - Newbie 2 02-18-2004 04:22 PM
kmail and gnupg axlotl Linux - Security 1 11-04-2003 12:21 PM
gnupg thales Linux - Software 3 07-04-2002 03:09 PM
GnuPG hurtsman Linux - Security 1 12-04-2001 06:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 12:54 AM.

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
Open Source Consulting | Domain Registration