Project

General

Profile

Actions

Bug #457

closed

Unable to Upload Documents as Forum Attachments

Added by Matt Gold over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority name:
High
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2010-12-09
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

When I tried to upload a document as a an attachment, I received the error seen in the attached screenshot. Sarah reported this as well on a separate ticket.


Files

Actions #2

Updated by Boone Gorges over 13 years ago

  • Priority name changed from Normal to High

This is indicative of a large and very strange problem. Somehow, the forum attachment directory /var/www/bb-attachments (the non-web-accessible path where the forum attachment plugin stores uploads) got confused. The path used by the plugin both for uploading new files as well as for downloading existing files was pointing to /var/www/bb-attachments/0, when for some reason the files themselves were at /var/www/bb-attachments/bb-attachments/0. This points to one of two causes:
1) The path in the plugin was changed (I checked the git history and this does not appear to be the case); or
2) The files were moved.

It's very easy to change the plugin file path (I will probably release a quick 1.1.2 to take care of this as well as one or two other things). But I find it a bit alarming. André, could I ask you to look at /var/www/bb-attachments? When I did ls -la in that dir, I found that the bb-attachments subdirectory had some funny owner/group issues (numbers where names should have been). Does that indicate any funny business?

Thanks.

Actions #3

Updated by Boone Gorges over 13 years ago

(André - just added you as a watcher to the ticket. Would you mind checking out http://redmine.gc.cuny.edu/issues/show/457#note-2 ?)

Actions #4

Updated by local admin over 13 years ago

Boone Gorges wrote:

(André - just added you as a watcher to the ticket. Would you mind checking out http://redmine.gc.cuny.edu/issues/show/457#note-2 ?)

Boone, I took a look and it seems pretty normal to me:

Issuing the following command: ll -d /var/www/bb-attachments
Returns the follwing result: drwxr-xr-x 3 root root 4096 Feb 2 2010 /var/www/bb-attachments

Perhaps I'm overlooking some angle? we can always set that ownership to commons:apache.

Actions #5

Updated by Boone Gorges over 13 years ago

[commons@commons bb-attachments]$ ls -la /var/www/bb-attachments
total 24
drwxr-xr-x  3 root    root    4096 Feb  2  2010 .
drwxrwxr-x 10 commons commons 4096 Dec  6 11:23 ..
drwxrwxrwx  3     542     544 4096 Dec  5 18:47 bb-attachments

Why do I see something different when I do that? (n00b)

Actions #6

Updated by Boone Gorges over 13 years ago

  • Status changed from Assigned to Resolved

Upload/download problem fixed in https://github.com/castiron/cac/commit/2a60f521ae8471c9cfae92f499114a1ab61e55e2. André, we can have our discussion offline if you'd rather.

Actions #7

Updated by local admin over 13 years ago

There's a sub-dir with the same name!

:-)

[root@commons ~]# ll -d /var/www/bb-attachments/bb-attachments/
drwxrwxrwx 3 542 544 4096 Dec 10 17:31 /var/www/bb-attachments/bb-attachments/

I recommend just a simple mv. I can issue that, but I'll chown the sub-dir to you now.

[root@commons ~]# ll -d /var/www/bb-attachments/bb-attachments/
drwxrwxrwx 3 542 544 4096 Dec 10 17:31 /var/www/bb-attachments/bb-attachments/
[root@commons ~]# chown commons:commons $_
[root@commons ~]# ll -d /var/www/bb-attachments/bb-attachments/
drwxrwxrwx 3 commons commons 4096 Dec 10 17:31 /var/www/bb-attachments/bb-attachments/

-AP

Actions #8

Updated by Boone Gorges over 13 years ago

I fixed it at the code level rather than moving the files, so there's no need. I just thought it was strange that this happened in what seemed like an unprompted way.

Actions

Also available in: Atom PDF