By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,694 Members | 1,846 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,694 IT Pros & Developers. It's quick & easy.

how to access /var/spool/mail/* as user apache

P: 5
i want to access mails from /var/spool/mail directory through php using browser instade of shell prompt. so i m under apache user & group.

i placed d php script file in /home by changing DocumentRoot=/home
now i can execute that script but cant access /var/spool/mail directory comntents
i got d following error:
access denied: u dont have permission

so wht i want is accessing mail file as user apache or give m alternative for storing mails to another location like in /home

plz zzzzzzz help me...................
Mar 13 '07 #1
Share this Question
Share on Google+
1 Reply


Colloid Snake
100+
P: 144
i want to access mails from /var/spool/mail directory through php using browser instade of shell prompt. so i m under apache user & group.

i placed d php script file in /home by changing DocumentRoot=/home
now i can execute that script but cant access /var/spool/mail directory comntents
i got d following error:
access denied: u dont have permission

so wht i want is accessing mail file as user apache or give m alternative for storing mails to another location like in /home

plz zzzzzzz help me...................
I'm pretty sure that if you read the documentation for your mail client (most likely sendmail, but I'm not sure - try doing
Expand|Select|Wrap|Line Numbers
  1. ps -ef | grep mail
  2.  
to figure it out - if that doesn't work, try it with wildcards), you would be able to reset the default location for mail delivery.

Another consideration - are you trying to access root's messages? Because then the user will need permissions to that directory, and that directory will need to be published as well (you almost definitely don't want to set up access to root on the webserver...).
Mar 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.