Squirrelmail attachments error "Could not move/copy file. File not attached"
If you get this errors in Squirrelmail "Could not move/copy file. File not attached" when trying to attach a file, it is not the
php.ini upload_tmp_dir setting, but the
attachment.
Check this directory and, if doesn't exist, create it with proper permissions (usually apache's user & group)/
Go to squirrelmail configuration (execute config/conf.pl script) and choose option 4 - Generatl Options:
Code:
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> 4
In the following scree check the 2nd option (Attachment Directory):
Code:
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/local/squirrelmail/data/
2. Attachment Directory : /var/local/squirrelmail/attach/
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID
15. Location base :
16. Only secure cookies if poss. : true
R Return to Main Menu
C Turn color on
S Save data
Q Quit
Command >>
For me, this directory didn't exist (stupid me).
Code:
# mkdir /var/local/squirrelmail/attach/
# chown nobody.nogroup /var/local/squirrelmail/attach/
Now it works (or it should be). If still there's an error, check that php.ini has uploads enabled (file_uploads = On).