MetrS
August 22, 2016, 12:42pm
1
Hello!
Have a problem with upload big files ( > 500 mb) to the server OwnCloud (ver. 9.0) from web.
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
OS Ubuntu 14.04.4 LTS
Any browser.
php.ini
output_buffering = 16384
max_execution_time = 3600
post_max_size = 16G
upload_tmp_dir = /var/www/owncloud/data/tmp
upload_max_filesize = 16G
.htaccess
php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value memory_limit 5120M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset ‘UTF-8’
php_value output_buffering 0
SetEnv htaccessWorking true
php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value default_charset ‘UTF-8’
php_value output_buffering 0
SetEnv htaccessWorking true
.user.ini
upload_max_filesize=16G
post_max_size=16G
memory_limit=5120M
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset=‘UTF-8’
output_buffering=0
/var/www/owncloud/config/config.php
‘tempdirectory’ => ‘/var/www/owncloud/data/tmp’,
df -h
root@owncloud:/etc/php5/apache2# df -h
Filesystem Size Used Avail Use% Mounted on
udev 366M 12K 366M 1% /dev
tmpfs 75M 556K 74M 1% /run
/dev/sda1 40G 20G 18G 53% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 371M 0 371M 0% /run/shm
none 100M 0 100M 0% /run/user
none 371M 0 371M 0% /tmp
But problem not solved.
Please help!
You either need to make more space on /tmp or use the php.ini config option upload_tmp_dir for the reasons explained here:
opened 11:55AM - 29 Jan 16 UTC
closed 08:16AM - 21 Sep 21 UTC
enhancement
comp:core
status/STALE
I have OwnCloud 8.2.2 deployed on a Fedora 23 machine. By default, its /tmp is a… tmpfs mount, which means that any OwnCloud file uploads larger than available system RAM will fail since it uses /tmp as a temporary upload directory. I've been trying to set the upload directory to something different via the tempdirectory option in config.php, but it doesn't seem to have an effect. All uploads still go to /tmp.
### Steps to reproduce
1. Create tmp directory in owncloud folder. Set rw permissions to apache user.
2. Set 'tempdirectory' => '/var/www/html/owncloud/tmp' in config.php
3. Upload a file using Web GUI or WebDav. Notice that owncloud still uses /tmp as the temporary upload directory
### Expected behaviour
/var/www/html/owncloud/tmp should be used as the temporary upload directory instead for Web GUI and WebDav
### Actual behaviour
Uploads go to /tmp and larger uploads will eventually fail due to lack of space in RAM.
### Server configuration
**Operating system**: Fedora 23
**Web server:** Apache/2.4.18
**Database:** Maria DB 1:10.0.21-1.fc23
**PHP version:** PHP/5.6.17
**ownCloud version:** 8.2.2
**Updated from an older ownCloud or fresh install:** Updated from 8.1
**List of activated apps:**
```
Enabled:
- activity: 2.1.3
- calendar: 0.8.1
- contacts: 0.5.0.0
- documents: 0.11.0
- files: 1.2.0
- files_sharing: 0.7.0
- files_texteditor: 2.0
- files_trashbin: 0.7.0
- files_versions: 1.1.0
- files_videoviewer: 0.1.3
- firstrunwizard: 1.1
- galleryplus: 14.3.0
- music: 0.3.8
- provisioning_api: 0.3.0
- templateeditor: 0.1
Disabled:
- encryption
- external
- files_external
- files_pdfviewer
- gallery
- notifications
- user_external
- user_ldap
```
**The content of config/config.php:**
```
{
"system": {
"instanceid": "ocpleicxwygq",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"benxiao.me"
],
"datadirectory": "\/var\/www\/html\/owncloud\/data",
"tempdirectory": "\/var\/www\/html\/owncloud\/tmp",
"overwrite.cli.url": "https:\/\/benxiao.me\/owncloud",
"dbtype": "mysql",
"version": "8.2.2.2",
"dbname": "owncloud_db",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"mail_from_address": "benxiao.me",
"mail_domain": "gmail.com",
"mail_smtpsecure": "tls",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "smtp.gmail.com",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"maintenance": false,
"loglevel": 2,
"appstore.experimental.enabled": false,
"trashbin_retention_obligation": "auto"
}
}
```
**Are you using external storage, if yes which one:** no
**Are you using encryption:** no
**Are you using an external user-backend, if yes which one:** no
### Client configuration
**Browser:** Chrome 48
**Operating system:** Fedora 23
### Logs
#### Web server error log
```
Insert your webserver log here
```
#### ownCloud log (data/owncloud.log)
```
Insert your ownCloud log here
```
#### Browser log
```
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
```
MetrS
August 22, 2016, 1:32pm
3
I already have this string in php.ini, and permission on folder is correct (755).
php.ini
output_buffering = 16384
max_execution_time = 3600
post_max_size = 16G
upload_tmp_dir = /var/www/owncloud/data/tmp
upload_max_filesize = 16G
MetrS
August 22, 2016, 1:43pm
4
I try
mount -o remount,size=5G /tmp
root@owncloud:/etc# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
none 5.0G 0 5.0G 0% /tmp
but problem not solved
MetrS
August 22, 2016, 4:55pm
5
Problem is SOLVED!
REASON: no permission www-data in new temp directory (((
chown -R www-data:www-data /var/www/owncloud/data/tmp