#110 Forwarding mail with attachments problem

closed
nobody
None
5
2006-02-26
2005-12-28
No

When forwarding a mail with an attachment, the
following errors pop up:

Warning: fopen
(/var/lib/squirrelmail/attachments/2UrrJSgsicOpyzrIB55T
v1bfeoPhBdqe) [function.fopen]: failed to open stream:
Permission denied
in /home/httpd/html/squirrelmail/src/compose.php on
line 974

and

Warning: fclose(): supplied argument is not a valid
stream resource
in /home/httpd/html/squirrelmail/src/compose.php on
line 976

Problem occurs with the file it tries to open in:
/var/lib/squirrelmail/attachments

If that directory is changed to have full permission
to everyone, the attachment file created looks as
follows:

-rw-r--r-- 1 nobody 4294967295 24718 2005-12-28 11:22
LAxKHFB5jNnlx1AIXetoiqEIVDuyIFTp

Notice the group ID is junk.

Greg

Discussion

  • Tomas Kuliavas

    Tomas Kuliavas - 2006-01-14

    Logged In: YES
    user_id=225877

    PHP safe_mode setting?

    Do you have something related to SELinux libraries on your
    webserver?

     
  • Gregory Szczeszynski

    Logged In: YES
    user_id=774828

    PHP:
    safe_mode => On
    safe_mode_gid => Off
    safe_mode_include_dir => no value
    safe_mode_allowed_env_Vars => PHP_
    safe_mode_protected_env_vars => LD_LIBRARY_PATH

    As far as SELinux, I don't think so. I'm using ARCH linux
    2.6.10, and I don't think they use SELinux
    (www.archlinux.org).

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-01-15

    Logged In: YES
    user_id=225877

    You are using php with safe mode turned on.
    /var/lib/squirrelmail/attachments directory must be owned by
    same user that owns SquirrelMail scripts.

    Compare 'ls -l
    /home/httpd/html/squirrelmail/src/compose.php' with 'ls -ld
    /var/lib/squirrelmail/attachments'

    For example, if SquirrelMail script are uploaded to
    'limited' account and webserver is running on 'nobody'
    account and 'nogroup' group, directory must be 'chown
    limited:nogroup attachments' and 'chmod 730 attachments' or
    any other less restrictive chmod. Directory owner must be
    'limited' account.

     
  • Marc Groot Koerkamp

    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.