You don't have permissions to upload or create files here - local (external ntfs-3g storage)


#1

Hi

I have NextCloud running on a mint install of Ubuntu 16.04 LTS (server edition) and have an issue when setting up a local “external storage” as I get the following error when I access the folder

You don't have permissions to upload or create files here

The local storage that I am mounting with label data (/media/win) on nextcloud is:

sdb                              836.6G
└─sdb1               ntfs        836.6G /media/win data

drive permissions in fstab is as follows

UUID=537FEF451930795B /media/win ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0   0

Giving my HTTP server ownership and permission as per nextcloud documentation for Local

sudo -u www-data chown -R www-data:www-data /media/win
sudo -u www-data chmod -R 0750 /media/win

I get the following error

chown: changing ownership of '/media/win': Operation not permitted

What could the cause of this problem be?


How do I symlink a folder in my home directory to nextcloud data directory in ubuntu?
Permissions issues on local external folders
#2

you should use the gid and uid of www-data (probably 33, check /etc/paswd and /etc/group for the ids)


#3

I have checked the uid and gid of www-data, being 33 and amended the fstab permissions as follows:

UUID=537FEF451930795B /media/win ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=33,uid=33   0   0

rebooted the server and still I get the error

You don't have permissions to upload or create files here

Anything else that I can try please.


[solved] External storage config for hard disk
Tutorial: How to migrate mass data to a new NextCloud server
#4

Managed to solve the problem past the recommendations made by tflidd and I am typing the solution here to probably serve others who may run into this problem.

fstab

#Windows-Partition
UUID=537FEF451930795B /media/win ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=33,uid=33   0   0

Reboot

sudo reboot

Force NextCloud to rescan files

cd /var/www/nextcloud
sudo -u www-data php console.php files:scan --all

And your ntfs local external storage is back in business.


You don’t have permission to upload or create files here
External storage problem... its there, but not there
How to allow Plex ánd Nextcloud access to external HDD
Ubuntu 16.04+nexcloud 11- data folder USB disk?
#6

@IgorGanapolsky can you reproduce the error you are getting.

This is an example output of the force scan

Scanning files for 2 users
Starting scan for user 1 out of 2 (username)
+---------+--------+--------------+
| Folders | Files  | Elapsed time |
+---------+--------+--------------+
| 28585   | 107801 | 02:11:30     |
+---------+--------+--------------+

#7

see u cant just go to the usb with the location in my case /media/pi/ where mount is pointed to or u cant mount in the cloud data folder so umount the storage and mount it to desktop like sudo mount /dev/sda /home/pi(in my case where pi is the username and specify the same in the cloud page).but the only drawback is that you edit any files on the external storage


#8

Hi @fab I know this is an older post but could you explain what exactly your fix here is doing, and if it’s still valid for NextCloud 13?


#9

@fab I see you used gid=33 and uid= 33, is this the default settings? I am not sure how to determine the uid and gid of the webUI user…

I have fstab working no problem, I can get around the mounted directory via ssh, but I can’t get the webui to use it correctly. Just shows a red square to the left of the line item.