[ZendTo] Upload from UNC path fails

Viktor Steinmann stony at stony.com
Tue Jan 16 07:59:30 GMT 2018


Works!

The problem was, that the directory "dropoffs" didn't exist. In the old 
version, this was called "files". Obviously the tool is unable to create 
this directory if not already existing. By manually creating a dropoffs 
directory it was fixed.

I'll have my users test now and will inform if any issues are found.

Thanks & Kind regards,

Viktor


On 15.01.2018 17:15, Jules wrote:
> Viktor,
>
> What does
>     echo $ZENDTOPREFS
> say?
> And I would check that, according to the output of "ls -lu 
> /opt/zendto/config", that it is definitely reading the preferences.php 
> file that you think it is!
>
> I would still advise you run the (4.99-6 versions) 
> upgrade_preferences_php and upgrade_zendto_conf scripts, then you can 
> check that your manual approach was actually correctly done and you 
> didn't miss anything or typo anything. Run either of them without any 
> command-line args and they will show you usage. They don't overwrite 
> anything at all, they both just print a new config file to stdout, 
> which you can redirect elsewhere as you choose. They tell you what 
> they found was new, and obsolete, and so they are likely to be far 
> more accurate than doing it all by hand. And lots faster.
>
> If you still can't find the problem, add a line immediately above that 
> "if" statement that says something like
> system("echo DEBUG trying to mkdir 
> ".$this->_dropboxDirectory."/$claimID > /tmp/DEBUGout");
> Then hopefully you try the operation you will get a 1-line file 
> created in /tmp/DEBUGout which will tell you the full patch of the 
> directory it is trying to create. Which should help isolate the problem.
>
> Cheers,
> Jules.
>
> On 15/01/2018 14:42, Viktor Steinmann wrote:
>> SELinux is not in use...
>>
>> The OS is CentOS 7.4.1708 (x86_64)
>>
>> I upgraded from the current release version (4.28-2 (working fine)) 
>> to 4.99-5 and now today to 4.99-6.
>>
>> For the migration to 4.99-6 I unpacked the .tgz in a new directory 
>> and manually adjusted the files in the /conf directory according to 
>> the values in the original, working 4.28-2 configuration (manual 
>> side-by-side comparison). My ZendTo installation runs in a symlink 
>> configuration pointing to the correct version, so I just adjusted to 
>> symlink to the new version afterwards. That allows me to switch back 
>> to the old version fast, by just restoring the original symlink.
>>
>> lrwxrwxrwx  1 apache apache   13 Jan 15 13:54 zendto -> ZendTo-4.28-2
>> drwxr-xr-x 12 apache apache 4096 Nov 21 11:19 ZendTo-4.28-2
>> drwxr-xr-x 12 apache apache 4096 Jan  9 13:21 ZendTo-4.99-5
>> drwxr-xr-x 12 apache apache 4096 Jan 12 17:04 ZendTo-4.99-6
>>
>> I hope there's no hard-coded path called /var/zendto, because I 
>> adjusted that in the variable NSSDROPBOX_DATA_DIR in preferences.php 
>> to adapt our default server configuration.
>>
>> I wonder if it would make any difference to let the 
>> "installer"-thingy do it's job...?
>>
>> Kind regards,
>>
>> Viktor
>>
>>
>> On 15.01.2018 15:12, Jules wrote:
>>> If you are running SELinux (run the command "sestatus" to find out), 
>>> then just looking at the filesystem permissions won't help you.
>>> If "sestatus" says something like "enforcing", then try this command 
>>> to reset the SELinux rules on /var/zendto:
>>>     restorecon -F -R /var/zendto
>>> and then restart the web server.
>>> Obviously you need to do all of that as root. :)
>>>
>>> What version of what OS are you using? What version of ZendTo did 
>>> you upgrade *from*, and how?
>>>
>>> Cheers,
>>> Jules.
>>>
>>> On 15/01/2018 12:54, Viktor Steinmann wrote:
>>>> OK, I have updated to 4.99-6 and tried again with open JavaScript 
>>>> console and different browsers.
>>>>
>>>> The error is now much more specific:
>>>>
>>>> Now I'm getting "Upload Error /  A unique directory to contain your 
>>>> dropped-off files could not be created. Please notify the system 
>>>> administrator."
>>>>
>>>> The apache log file shows "PHP Warning:  mkdir(): No such file or 
>>>> directory in 
>>>> /var/www/html/my.domain.com/ZendTo-4.99-6/lib/NSSDropbox.php on 
>>>> line 1147, referer: https://my.domain.com/verify.php"
>>>>
>>>> The line reads: "if ( 
>>>> mkdir($this->_dropboxDirectory."/$claimID",0700) ) {"
>>>>
>>>> So I might have a rights issue on the file system. However all 
>>>> directories belong to apache:apache (checked multiple times). Any 
>>>> hints as where the permissions could be wrong?
>>>>
>>>> Kind regards,
>>>>
>>>> Viktor
>>>>
>>>>
>>>>  if ( mkdir($this->_dropboxDirectory."/$claimID",0700) )
>>>>
>>>>
>>>> On 12.01.2018 17:08, Jules wrote:
>>>>> Viktor,
>>>>>
>>>>> The error message in the alert box is a "best guess" of the most 
>>>>> likely cause of why the upload failed.
>>>>> It can fail for all sorts of reasons, a lot of them to do with 
>>>>> security restrictions imposed by web browsers on what JavaScript 
>>>>> code can and cannot do (and look at).
>>>>>
>>>>> Take a look at your JavaScript console, as that is the only place 
>>>>> anything useful might be written.
>>>>> I have tried to get the error message itself in JavaScript, but 
>>>>> all I ever get is "undefined" or "error".
>>>>> Fat lot of use that is. :-(
>>>>>
>>>>> Also, try it on a different browser.
>>>>>
>>>>> Cheers,
>>>>> Jules.
>>>>>
>>>>> On 12/01/2018 13:03, Viktor Steinmann wrote:
>>>>>> Hi all
>>>>>>
>>>>>> I installed the latest beta today on Centos7 (2018/01/12) and it 
>>>>>> works
>>>>>> quite well so far (and looks nice, btw). However when trying to 
>>>>>> upload a
>>>>>> single file from an UNC path, the software complains, that 
>>>>>> uploading a
>>>>>> complete directory is not supported. Strangely enough, this happens
>>>>>> after successfully adding the file to the list of uploads, when 
>>>>>> clicking
>>>>>> on "Drop off files".
>>>>>>
>>>>>> Anybody else with this problem?
>>>>>>
>>>>>> Kind regards,
>>>>>>
>>>>>> Viktor
>>>>>>
>>>>>> _______________________________________________
>>>>>> ZendTo mailing list
>>>>>> ZendTo at zend.to
>>>>>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>>>>>
>>>>> Jules
>>>>>
>>>>
>>>
>>> Jules
>>>
>>
>
> Jules
>




More information about the ZendTo mailing list