Cannot Upload Files Update OwnCloud

Short run down is for some, unknown reason I am unable to upload files to my ownCloud. Doesn't matter if it is the local storage or the external mount. I am however able to create .txt files and folders using the ownCloud online interface.

Below is a screenshot of the ls -lah command. Red indicated files owned by www-data, fuscia = the permissions script which I also am having issues with.

Here is the script:

#!/bin/bash
printf "Step 1\n"
ocpath='./'
printf "step 2\n"
htuser='www-data'
htgroup='www-data'
rootuser='root'

printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater

printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750

printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/

chmod +x ${ocpath}/occ

printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
 then
  chmod 0644 ${ocpath}/.htaccess
  chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
 then
  chmod 0644 ${ocpath}/data/.htaccess
  chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi

Here is the result:
(Sorry only one image per post :frowning:)

My Story:

I was able to upload and download files to my hearts content until about a month ago. I didn't notice the inability to upload due to the way we use ownCloud. However no user including the admin can upload files or folders. We were previously able to do this, and even do it on an external storage.

I am unsure as to why this is the case, I am more than happy to provide the logs. I have being through them and am unable to find out what is happening.

I have got external storage going to a windows server. I can read and write folders to that server no issue. Just no upload of files from my local machine to the "cloud" or anyone else for that matter.

System is Ubuntu server: 16.04 LTS
All fairly new/ as in installed this year with up to date services.

LDAP is intergrated
External Storage is intergrated
https is currently not happening until I get my cert coming through

If you can point me in the correct direction or suggest ideas I would be very grateful. If you require more information I will be happy to provide it for you, please call me an idiot and ask away :slight_smile:

Thanks in advance

Result of the permissions script/