Private user directory

Nextcloud version (eg, 20.0.5): 22.1.1
Operating system and version (eg, Ubuntu 20.04): don’t know (web hosting)
Apache or nginx version (eg, Apache 2.4.25): don’t know (web hosting)
PHP version (eg, 7.4): 7.4.24
Using sqlite

Hi.

This is my first time using Nextcloud, i’m setting it up for a customer.

What i want:
Each user (except admin) should have a private directory for files, he/she should see only files in this directory.

This sounds like it should be simple, but i can’t find the right options in the backend.

Is it possible?

Thanks.

Please do not set up Nextcloud for a customer on a webspace (!!!) and without any knowledge. It’s no wonder that many people think Nextcloud is bad and host their data at Microsoft, Google, Amazon or Dropbox. Don’t manage important data of other people.

Search Managed Nextcloud and pay for it.

Why? Please post more details. I think it is possible. But Nextcloud is a collaboration platform for sharing data. Are you afraid that people will share secret data? They can do that via Dropbox or E-Mail and other platforms if they really want to. It makes no sense.

Thanks for the quick response.

Why? Please post more details. I think it is possible. But Nextcloud is a collaboration platform for sharing data.

Because that’s what the customer wants.

He wants to share files with certain individuals. Each user gets different files. No user shall see files of another user.

Some points:

  • on default “no user can see files of another user” including administrator / admin

  • the user can configure to share or not to share, the user owns the data in nextcloud

  • you can deactive or active re-sharing in admin settings (set to not re-sharing?)

  • you can use the app guests which perhaps solves your problem. Watch 2 minutes https://www.youtube.com/watch?v=XE7_cNk7E7g
    Guest accounts are very restrictive.

  • you can deactivate download option in public shares (does not really help)

  • if people can read data they can download them and upload them to a cloud platform or use e-mail.

  • on default “no user can see files of another user” including administrator / admin

Ah. As i always saw the same files for each user, i thought they were all seeing the same, public folder.
But it seems these are indeed user specific. Which is one step in the right direction. But that raises the question: Where do the default files come from? It looks like there is a folder somewhere which content gets copied into each new user’s folder. If that’s the case, where are these files?

The “guests” app looks useful, but there is still too much work involved for the (future) admin (= the customer, which is a non-technical person)

Thanks for your help so far.

Look Providing default files
It is in /path/to/nextcloud/core/skeleton.
You can change it.

Yes. But it think your problem was only a missunderstanding and you do not need the guest app.

If you want to share folders and files in a group you can look Group folders
Watch 3 minutes https://www.youtube.com/watch?v=LaTd-TTj41Q

For a few users and few files, or to have a look and feel of a system, webhosting can work (it actually depends a lot the webhosting configuration that you can’t influence). To use it more seriously, it will be difficult and many restrictions and problems are related to this environment.

1 Like

@321dev
For only 5 € to 20 € a month you get a Managed Nextcloud with:

  • e.g. 500 GB or more
  • usable for 10 users or more
  • integrated Talk, OnlyOffice, …
  • optimized for Nextcloud
  • updates performed by the provider

For a high performance business nextcloud e.g. with backups, … you pay perhaps 5 € each user each month including access fileservice, AD, Outlook, …

Thanks, but the group folders won’t help, as each user gets individual files.

The function i’m missing now is:
From the admin account, i would like to copy files to the home directory of a specific user (either from the desktop or from the admin files).

But i don’t see any way to access the user directory from the admin account. Maybe there is an app for that, too?

For only 5 € to 20 € a month you get a Managed Nextcloud with:

Yes, i would consider suggesting that to our customer, but right now, i don’t think i’m limited by my Nextcloud installation. It’s more a question of configuring it to do what our customer wants.

If you install Nextcloud not on a web hosting but a VPS or root server, you can copy files in the directorys of users directly (e.g. sftp) and then
sudo -u www-data php occ files:scan --all

Also there is a app (sorry i missed the name) to switch the identy from admin to a user. But i think that is a bad idea.

Every user also can share a folder with admin (option modfiy) and then the admin can upload files in that folder.

You can use group folders for every user for the user itself and the admin.

If you host Nextcloud in the customer office then perhaps you can use external storage SMB / Cifs and the corresponding rights for distribute files.

Unfortunately this is impractical for our purpose.

Our customer intends to use it a little bit like a CRM tool:

  • our customer (will call admin from here on) sends a link to the NC login page to his customer where he can create a new account

  • admin activates user and copies certain user-specific files into user’s directory

  • customer logs in and sees these files

Maybe NC is not the right tool for the job, but my boss thought it would be suitable, so i had to go this route.

Admins can create folder in their accounts and share with “Invite Guest”. Account (e-mail) is generated. customer get the email for guest account and must set password.

admin activates user and copies certain user-specific files into user’s directory

Admin can copy the files in the shared folder.

customer logs in and sees these files

Works. Password reset if needed only user not admin needed.
Admin can delete guest in user administration or resent welcome message.

1 Like

I think the problem is the fact that the customer needs an admin account.

But perhaps you do not really need a account for the customer of the customer.

The customer (admin) can create a directory including public share.
The customer (admin) set rights e.g. to modify.
The customer (admin) can set a password e.g. auto-generated with Nextcloud.
The customer can copy or upload files to the public share (directory).

The customer (admin) sends the share including password (two ways) to his customer.

Admin to customer:
Here the link to the video. You get the password with a SMS.

Link in e-mail:
Nextcloud

Password in SMS: FZPanqAw
In this example only a readonly-link für the customer of the customer.

I think a username/password is not really better than url and password.
But with username (e.g. guests) you do not need a second way for security.

This is not perfect, but might actually be sufficient. I’ll create a demo and present it to our customer.

Thanks a lot for your help!

Edit: Are there any hooks that would allow me to automate this?
If a user creates a new account, create a folder in the admin file space and share it with that user?

I think not. There are some workflow apps but i think they could not help you.

I think you create for your customer (admin) an admin account and then they must create the folder and invite their customers. If you have more than one customer (admin) that would be a problem on the same nextcloud.