Adding Local Storage. Unable to create folder

I mounted an external drive and mounted to /mnt/external
then ran
sudo chown -R www-data:www-data /mnt/external
sudo chmod -R 0750 /mnt/external
switched to user www-data and was able to create a folder in the bash environment
then in Nextcloud I added the folder

however from the user interface Im unable to create a folder in the external repo

Do I need to enter a global credential for that? If so, it is not saving it…

Thank you

You can try to find in the logs, what kind of error you get.

For the permission, you can check if the user www-data really has access:
sudo -u www-data ls /mnt/external
(just to be sure, and that there is no restriction on the parent folders)

If that still is a problem, php might be restricted to certain folders (outside of open_basedir), this should show up in the logs.

@corsario28 you are suggesting a snap install:

grafik

if this is so, please take a look at FAQ's · nextcloud-snap/nextcloud-snap Wiki · GitHub

see also Configure Nextcloud snap · nextcloud-snap/nextcloud-snap Wiki · GitHub

Had to copy files inside the folder because it was empty

It is the snap repo version of nexcloud, I cant run php. Do you know how to get the errors ?

Thank you

@corsario28 see getting help

especially:

  • to create an issue complete the bug report (the more information the better)
  • run the debugging script before raising an issue

please be clear what you are trying to run and how

www-data is totally irrelevant

please read the docs Nextcloud snap wiki

see permissions FAQ's · nextcloud-snap/nextcloud-snap Wiki · GitHub

What permissions should external media have?

See Snap confinement

Removable media must be mounted to either /media or /mnt as root with root permissions and connected to Snap!

The interface providing the ability to access removable media is not automatically connected upon install, so if you’d like to use external storage (or otherwise use a device in /media or /mnt for data), you need to give the snap permission to access removable media by connecting that interface:

sudo snap connect nextcloud:removable-media

yes, none of that worked. I will either switch to a sftp to the localhost or change the data folder. My idea was to have a vHDD for each user but looks it is not possible because if the folder exist it can’t create the user and if you copy the files to another location it breaks the files. Thank you!

This is the way I resolved
Goal: Every user to have its own datastore
Environment: Virtualized

  • In Nextcloud create the user but dont log it in
  • Partition the new disk and format it
  • mount the disk in the user directory under data
  • chown root:root
  • chmod 755 -R

log in the user, will create the default files and will be able to delete/create new files

I used this way as I can expand every user as independent storage instead of using the quotas. Easier also to restore if need to rebuild

hope someone liked the idea

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.