LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   squirrelmail : cannot add attachments (https://www.linuxquestions.org/questions/linux-software-2/squirrelmail-cannot-add-attachments-43704/)

ilya 02-01-2003 10:29 PM

squirrelmail : cannot add attachments
 
Hello there,

I am running squirrelmail-1.2.10-1 on RedHat 7.3 with php-4.1.2-7. Squirrelmail works fine except I cannot seem to add attachments. Get the error:
Could not move/copy file. File not attached

Nothing interesting in http logs...

Any pointers would be welcome as I think I've exhausted google et. al.
Thanks in advance!

Here's some info:

[root@calendar config]# grep attach config.php
$attachment_dir = "/var/lib/squirrelmail/attach/";

[root@calendar config]# ls -al /var/lib/squirrelmail
...
drwxr-xr-x 2 apache apache 4096 Feb 1 15:45 attach

[root@calendar config]# ps -ef | grep http
root 31933 1 0 19:11 ? 00:00:00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache 31936 31933 0 19:11 ? 00:00:06 /usr/sbin/httpd -DHAVE_ACCESS -D

[root@calendar config]# grep upload /etc/php.ini
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
upload_tmp_dir = /var/lib/squirrelmail/attach
; Maximum allowed size for uploaded files.
upload_max_filesize = 5M

mcleodnine 02-03-2003 07:10 AM

Hmmm. Wierd.

All I can come up with is this blurb from the configure script.
Code:

Path to directory used for storing attachments while a mail is
being sent.  There are a few security considerations regarding this
directory:
  1.  It should have the permission 733 (rwx-wx-wx) to make it
      impossible for a random person with access to the webserver
      to list files in this directory.  Confidential data might
      be laying around in there.
  2.  Since the webserver is not able to list the files in the
      content is also impossible for the webserver to delete files
      lying around there for too long.
  3.  It should probably be another directory than the data
      directory specified in option 3.

But my data dir shows up as same owner as apache user and drwx --- --- for permissions.

And the upload_tmp_dir is commented out in my php.ini.

ilya 02-03-2003 02:15 PM

yep - weird :)
 
thanks for the tip!
i verified that it is not permissions or PUT restrictions by placing a cgi into the src dir and doing an http upload via the cgi to the attach directory - to me that says permissions are ok and webserver is allowing http uploads.
now i am struggling to find a way to debug the php code- i am mostly clueless about php...
oh what fun

mcleodnine 02-03-2003 02:41 PM

Befor debugging the php in squirrelmail you might want to try and get the previous version and see if you have the same problem. I've been running 1.2.9 for quite some time and testing 1.2.10 for about 2 weeks now with no real problems.

Also look to see if you have any mysterious .htaccess files kicking around...


All times are GMT -5. The time now is 11:37 PM.