Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / June 2006



Tip: Looking for answers? Try searching our database.

cpan not not working because of unsafe ownership on configuration file gpg

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marek Stepanek - 13 Jun 2006 20:45 GMT
Hello all,

I am unable to help myself out of this problem. My module cpan is always
complaining, when I issue an install command with errors like follows:

***
gpg: WARNING: unsafe ownership on configuration file
`/Users/mareklaptop/.gnupg/gpg.conf'
gpg: WARNING: unsafe ownership on configuration file
`/Users/mareklaptop/.gnupg/gpg.conf'
gpg: Signature made Sun Jun 11 18:26:58 2006 CEST using DSA key ID 450F89EC
gpg: external program calls are disabled due to unsafe options file
permissions
gpg: keyserver communications error: general error
gpg: Can't check signature: public key not found

Signature invalid for distribution file. Please investigate.
***

I have installed gpg, it is true some weeks ago, because I was sometimes
stumbling over these gpg messages with the Module cpan. But now, nothing
goes ...

The rights in my gnupg-folder are as follows:

[markslap:~/.gnupg] mareklap% ls -l
total 224
16 -rw-------  1 mareklap  staff   8082 12 Jun 22:28 gpg.conf
184 -rw-r--r--  1 mareklap  staff  93826  5 Jun 07:58 pubring.gpg
 8 -rw-------  1 mareklap  staff    600 10 Jun 06:49 random_seed
 8 -rw-------  1 mareklap  staff   1107 17 Apr 12:06 secring.gpg
 8 -rw-------  1 mareklap  staff   1200  5 Jun 07:59 trustdb.gpg

I already changed the rights of gpg.conf to 755, without any success. In the
config-file ( gpg.conf ) is an uncommented:

   keyserver hkp://subkeys.pgp.net

and

   keyserver-options auto-key-retrieve

thank you very much for any hint

marek

ps: MacOS 10.3.9 - Perl v5.8.8

Signature

___________________________________________

       the embassy for talented young musicians
   Podium International | Marek Stepanek | mstep@PodiumInternational.org
       http://www.PodiumInternational.org
           ___________________________________________

       
___________________________________________________________
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

Sherm Pendley - 13 Jun 2006 21:12 GMT
> I am unable to help myself out of this problem. My module cpan is  
> always
[quoted text clipped - 3 lines]
> gpg: WARNING: unsafe ownership on configuration file
> `/Users/mareklaptop/.gnupg/gpg.conf'

It means that the user running gpg (root) is not the same as the user  
that owns the gpg.conf file (mareklaptop).

If verifying module signatures is your only use for GPG, you could  
simply chown that file to make it owned by root.

A better option is to install and use the latest CPAN.pm module,  
which allows you to supply an alternative to the final "make install"  
command. You can configure it to use "sudo make" instead of just  
"make" for that step, so that you no longer have to run the CPAN  
shell itself with sudo. That, in turn, means that *only* the install  
step will be run as root; the download, build, and test steps will be  
run as your normal user login.

The second option is more work, but it reduces the amount of stuff  
that's running as root - which is always a good idea.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Marek Stepanek - 13 Jun 2006 23:10 GMT
> It means that the user running gpg (root) is not the same as the user
> that owns the gpg.conf file (mareklaptop).
[quoted text clipped - 14 lines]
>
> sherm--

thank you Sherm,

this was it. It is late in Munich now, so I tried only the first solution:

% sudo chown root:staff .gnupg/gpg.conf

and

% sudo chown root:staff .gnupg/

cpan is working now :-) I will care tomorrow about the second solution ...
So long (until tomorrow evening) thank you again

marek

ps: but one thing is worrying me: I am unable now, to change back to the
folder .gnupg ...

[markslap:~] mareklap% sudo cd .gnupg/
sudo: cd: command not found

there is probably something fundamental, which I do not understand about
root in the shell ???

       
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
Sherm Pendley - 13 Jun 2006 23:10 GMT
> ps: but one thing is worrying me: I am unable now, to change back  
> to the
[quoted text clipped - 6 lines]
> about
> root in the shell ???

The cd command is a built-in, so there's no external /usr/bin/cd app  
for sudo to load and run as root. Hence the error "cd: command not  
found".

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Marek Stepanek - 14 Jun 2006 22:13 GMT
> A better option is to install and use the latest CPAN.pm module,
> which allows you to supply an alternative to the final "make install"
[quoted text clipped - 8 lines]
>
> sherm--

Which bundle exactly you suggest, that I install ? Sorry for this dump
question, but making

cpan> i /cpan/

issues 317 answers. Nothing with a pure cpan.pm ...

Probably you mean Bundle::CPAN or Bundle::CPANPLUS ? or something else ?

thank you for your patience

marek

Signature

___________________________________________

       the embassy for talented young musicians
   Podium International | Marek Stepanek | mstep@PodiumInternational.org
       http://www.PodiumInternational.org
           ___________________________________________

       
___________________________________________________________
All New Yahoo! Mail ? Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

Sherm Pendley - 14 Jun 2006 23:43 GMT
>> A better option is to install and use the latest CPAN.pm module,
>> which allows you to supply an alternative to the final "make install"
[quoted text clipped - 18 lines]
> Probably you mean Bundle::CPAN or Bundle::CPANPLUS ? or something  
> else ?

When you use //s with i, CPAN uses a regex match. If you know the  
exact name of the module you want, and simply want to check the  
version, you can narrow the search by a *lot* with:

    i CPAN

But you mentioned earlier that you're using Perl 5.8.8, right? That's  
only a couple of months old, so you probably have a recent-enough  
CPAN already. What do you get when you enter this:

    o conf make_install_make_command

If you get "unknown configuration variable" you'll need to upgrade  
CPAN. But if you get something like this:

    make_install_make_command [make]

If you get something like that, then you can just assign that config  
variable a new value. Start CPAN with sudo, and change the config  
variable like this:

    sudo perl -MCPAN -e shell

... in CPAN ...

    o conf make_install_make_command "sudo make"
    o conf commit

Then exit the CPAN shell. You'll need to fix up the .cpan directory  
and its contents now - since you've been running the CPAN shell as  
root, all of those files are owned by root. You can fix that with this:

    sudo chown -R mareklaptop ~/.cpan

Now, you should be able to start CPAN without sudo:

    perl -MCPAN -e shell

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.