Last modified: 2014-02-06 08:46:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62777, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60777 - importImages uploads succeed when source file is unreadable
importImages uploads succeed when source file is unreadable
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-03 19:00 UTC by Sam Reed (reedy)
Modified: 2014-02-06 08:46 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2014-02-03 19:00:50 UTC
I'm not sure if this should be in maintenance scripts or whatever

Due to file permission issues, the importImages script reports that the upload worked, but it really didn't - the file isn't there but the page text is.

If the file isn't readable, the "upload" for that file should be aborted, not creating page text

The specific error being "failed to open stream: Permission denied"



reedy@tin:/tmp/uploads$ sudo -u apache mwscript importImages.php
--wiki=commonswiki --user="Odder" /tmp/uploads
Import Images

Importing 2014 State Of The Union Address Enhanced.webm...PHP Warning: 
fopen(/tmp/uploads/2014 State Of The Union Address Enhanced.webm): failed to
open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278

Warning: fopen(/tmp/uploads/2014 State Of The Union Address Enhanced.webm):
failed to open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278
done.
Importing 2013-10-05 President Obama's Weekly Address.webm...PHP Warning: 
fopen(/tmp/uploads/2013-10-05 President Obama's Weekly Address.webm): failed to
open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278

Warning: fopen(/tmp/uploads/2013-10-05 President Obama's Weekly Address.webm):
failed to open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278
done.
Importing 2013-10-12 President Obama's Weekly Address.webm...PHP Warning: 
fopen(/tmp/uploads/2013-10-12 President Obama's Weekly Address.webm): failed to
open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278

Warning: fopen(/tmp/uploads/2013-10-12 President Obama's Weekly Address.webm):
failed to open stream: Permission denied in
/a/common/php-1.23wmf11/includes/filebackend/SwiftFileBackend.php on line 278
done.

Found: 3
Added: 3
reedy@tin:/tmp/uploads$ ls -al
total 2404792
drwxrwxrwx  2 reedy wikidev      4096 Feb  3 18:47 .
drwxrwxrwt 46 root  root        12288 Feb  3 18:46 ..
-rw-rw-r--  1 reedy wikidev      1255 Feb  1 14:50 2013-10-05 President Obama's
Weekly Address.txt
-rw-rw-r--  1 reedy wikidev 163504321 Jan 27 22:13 2013-10-05 President Obama's
Weekly Address.webm
-rw-rw-r--  1 reedy wikidev      1197 Feb  1 14:52 2013-10-12 President Obama's
Weekly Address.txt
-rw-rw-r--  1 reedy wikidev 158637780 Feb  1 14:34 2013-10-12 President Obama's
Weekly Address.webm
-rw-rw-r--  1 reedy wikidev       884 Jan 31 16:26 2014 State Of The Union
Address Enhanced.txt
-rw-rw-r--  1 reedy wikidev 909068945 Jan 30 19:37 2014 State Of The Union
Address Enhanced.webm
-rw-r--r--  1 reedy wikidev 909060459 Feb  3 18:45 SOTU.tar.gz
-rw-r--r--  1 reedy wikidev 322185685 Feb  3 18:46 WeeklyAddresses.tar.gz
reedy@tin:/tmp/uploads$
reedy@tin:/tmp/uploads$
reedy@tin:/tmp/uploads$
reedy@tin:/tmp/uploads$
reedy@tin:/tmp/uploads$
reedy@tin:/tmp/uploads$ chmod 777 *
reedy@tin:/tmp/uploads$ rm *.gz
reedy@tin:/tmp/uploads$ ls -al
total 1202392
drwxrwxrwx  2 reedy wikidev      4096 Feb  3 18:52 .
drwxrwxrwt 46 root  root        12288 Feb  3 18:50 ..
-rwxrwxrwx  1 reedy wikidev      1255 Feb  1 14:50 2013-10-05 President Obama's
Weekly Address.txt
-rwxrwxrwx  1 reedy wikidev 163504321 Jan 27 22:13 2013-10-05 President Obama's
Weekly Address.webm
-rwxrwxrwx  1 reedy wikidev      1197 Feb  1 14:52 2013-10-12 President Obama's
Weekly Address.txt
-rwxrwxrwx  1 reedy wikidev 158637780 Feb  1 14:34 2013-10-12 President Obama's
Weekly Address.webm
-rwxrwxrwx  1 reedy wikidev       884 Jan 31 16:26 2014 State Of The Union
Address Enhanced.txt
-rwxrwxrwx  1 reedy wikidev 909068945 Jan 30 19:37 2014 State Of The Union
Address Enhanced.webm
reedy@tin:/tmp/uploads$ sudo -u apache mwscript importImages.php
--wiki=commonswiki --user="Odder" /tmp/uploads
Import Images

Importing 2014 State Of The Union Address Enhanced.webm...done.
Importing 2013-10-05 President Obama's Weekly Address.webm...done.
Importing 2013-10-12 President Obama's Weekly Address.webm...done.

Found: 3
Added: 3
reedy@tin:/tmp/uploads$

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links