Comments (10)
wow, thank you!
solution:
# unset exported perl variables
whoami # root
nano ~/.bashrc
comment/disable all export PERL lines at the bottom
logout/login again
# install as root, but not in /root but in /usr/local
whoami # root
cpan -i Email::Outlook::Message
which msgconvert # /usr/local/bin/msgconvert
# test as apache
su -s /bin/bash apache
msgconvert
from email-outlook-message-perl.
Hi @vielhuber,
In general, msgconvert
should run as non-root just fine. In fact, I would never run it as root. Here's what I would advise:
- Please check if you can run other programs form your web application.
- If running other programs works, but running
msgconvert
doesn't, please post more information here, such as
- Where is
msgconvert
installed? - Where are the programs that you can run installed?
- How are you executing the programs?
- What failure messages do you get?
- If running other programs does not work: Please ask your question on a general-purpose forum like stack-overflow. You should probably include most of the points above in your question.
Good luck debugging!
from email-outlook-message-perl.
Please check if you can run other programs form your web application.
Yes, other programs run.
Where is msgconvert installed?
Where are the programs that you can run installed?
How are you executing the programs?
What failure messages do you get?
They are usually installed unter /usr/local/bin/.
Can you give me some small hints what's the correct / usual way to run msgconvert as apache (as a non root user)?
- Use cpanm(?)
- Use local::lib(?)
Thanks in advance.
from email-outlook-message-perl.
Where is msgconvert installed?
Where are the programs that you can run installed?
How are you executing the programs?
What failure messages do you get?They are usually installed unter /usr/local/bin/.
How can I help you if you don't answer any of my questions?
from email-outlook-message-perl.
Where is msgconvert installed?
which msgconvert
/root/perl5/bin/msgconvert
Where are the programs that you can run installed?
/usr/local/bin/
How are you executing the programs?
su -s /bin/bash apache
/root/perl5/bin/msgconvert
What failure messages do you get?
Permission denied
from email-outlook-message-perl.
Yes, that makes sense. The way you installed msgconvert makes it only available to the root user. Other users can't access files inside /root
.
As I understand it, cpan
should only install modules in /root/perl5
if you run cpan -I Email::Outlook::Message
. That's -I
with a capital I
. You should user the lower-case -i
instead. If that doesn't work there's something wrong with your CPAN configuration.
from email-outlook-message-perl.
Hello, thanks for your answer.
This is what I further tried (I think I'm close):
whoami # root
mkdir /usr/share/httpd/.cpan
chown apache:apache /usr/share/httpd/.cpan
su -s /bin/bash apache
cpan -i Email::Outlook::Message
Now It installs lots of stuff but reaches finally the point:
...
Running make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/root/perl5/bin'
mkdir /root/perl5: Permission denied at /usr/share/perl5/ExtUtils/Install.pm line 494.
I just tested out the procedure on another machine and it's exacly the same.
from email-outlook-message-perl.
I have no idea why CPAN would try to install to /root/perl5/bin even when running as the apache user. Maybe that's a centos thing? I suggest asking on StackOverflow because I'm all out of ideas.
from email-outlook-message-perl.
Thanks, can you give me another hint:
Why are there so many threads/tutorials out there when this should work out of the box?
https://stackoverflow.com/questions/11367399/installing-cpan-modules-without-root
https://stackoverflow.com/questions/2980297/how-can-i-use-cpan-as-a-non-root-user
https://www.perlmonks.org/?node_id=1053274
http://alumni.soe.ucsc.edu/~you/notes/perl-module-install.html
from email-outlook-message-perl.
Those are all about installing as a non-root user. I don't know what's going on. It used to be that non-root users could just do cpan -i
.
These solutions all seem totally over-the-top.
However, they do give a hint: Perhaps the PERL5LIB variable is set to something like /root/perl5
. This won't be reset if you use su
without --login
.
But anyway, you need to look for answers for system-wide installation of cpan modules, since you actually have root access. This means those non-root solutions do not apply to you.
from email-outlook-message-perl.
Related Issues (20)
- Can't open files with leading space characters HOT 4
- Installation instructions for Windows HOT 1
- "From " lines as mbox separators
- line endings on unix system HOT 4
- Add support for UTF-8 in message HOT 6
- Failed tests on macOS HOT 4
- Keep knowledge of encoding for text properties around
- Add caching to Github Action HOT 1
- Run as a container HOT 1
- Wide character errors HOT 5
- charset name UTF8 do not conform IANA HOT 3
- Wide character in print at /usr/bin/vendor_perl/msgconvert line 397, error with latest update (0.920) HOT 3
- How to display the application/rtf part in Thunderbird?
- Failed test 'Checking if body structure for t/files/plain_jpeg_attached.msg is the same' HOT 2
- codepage CP28592 unknown HOT 1
- mail format HOT 1
- a converted message have a broken encoding in a message body (have cp1251 in msg ) HOT 3
- Does it support the reverse conversion? HOT 1
- Conversion to .eml in Windows - extra newlines break attachments HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-outlook-message-perl.