Server: Renaming folder doesn't sync to other users

Created on 9 Nov 2016  Â·  59Comments  Â·  Source: nextcloud/server

Steps to reproduce

  1. Rename shared folder via Web interface
  2. Sync folder with other user
  3. Second user doesn't see new folder name

Expected behaviour

All users should see the same new folder name

Actual behaviour

Every user got his own folder name

Server configuration

Operating system: CentOS 7

**Web server: Apache/2.4.6 (CentOS)

**Database: mysql 5.5.38

**PHP version: 5.5.38

**Nextcloud version:10.0.1 (stable)

**Updated from an older Nextcloud/ownCloud or fresh install:updated from old ownCloud

Where did you install Nextcloud from:

Signing status:


Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:


App list

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

The content of config/config.php:


Config report

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)


LDAP config

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log


Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)


Nextcloud log

Insert your Nextcloud log here

Browser log


Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

1. to develop enhancement sharing papercut

Most helpful comment

+1 for this. a file should only have one name. this is very confusing for our employees...

All 59 comments

This is actually the expected behaviour, because the name might be different for each user and the users can rename the folder on their end.

Ok, not very good for centrally managed shared folders. Perhaps I'm not using your product in correct way. Any options to change this behaviour?
I've got another issue, if someone is editing file and other user renames it at the same time than file is duplicated after first user saves changes. Looks like this is by design too. Am I correct?

Commenting on this as for a centrally managed share folders/file system, if User 1 renames a file, ALL users should see it as renamed. Not following this behavior would be a big show stopper for any company thinking of migrating from sharepoint or dropbox to NextCloud? If two users are trying to make changes to 1 file and 1 user renames (not copies) it, both users are now working on different documents, and the other user doesn't even see (in the web or a synced version) the NEW file name??? What use case in a shared environment are you thinking the users should be able to have the same files/folders only give them different names without other users seeing the changed names? I can't even think of a use case where that is helpful, and doesn't end in a bad situation of identical files with different names not seen by all users who supposedly have access to the file(s)?

Please consider reopening this. In my opinion, it is a valid bug. A shared file or folder that is renamed should still be properly shared.

@secure11 you seem to misunderstand. Only the most outer folder you shared with someone is not renamed.

Example:

  1. UserA shares level1 with UserB
  2. UserB already has a folder level1
  3. UserB sees their level1 and level1 (2) from UserA
  4. UserA renames level1/level2/level3 to level1/level2/levelC
  5. UserB will see this rename and have the file level1 (2)/level2/levelC
  6. UserA renames level1 to levelA
  7. UserB will still see the files in level1 (2)

The problem is that UserB could rename the level1 (2) at any point (e.g. to level1 (UserA)) at which point we shouldn't automatically rename the stuff any more.

A shared file or folder that is renamed should still be properly shared.

That is also a misunderstanding. Renaming a file does not remove or corrupt shares.

@nickvergessen I don't mean that the share is removed or corrupted. I mean that if UserA shares a file1.jpeg with UserB, then UserA renames the file to file1.jpg then the file rename does not propagate to UserB. In the specific case reported to me by a user, he shared a file with a large number of users then realized that the file extension was wrong and wanted to correct it, but the new filename did not propagate to the other users. To work around this he renamed the file and then unshared and reshared it with each of the users. I got the impression from the user that he found this process inconvenient. Perhaps it's worth considering a way to make this more convenient? Thanks!

I guess it makes some sense. Maybe @jancborchardt can comment on it.
Maybe we could/should rename mounts that use the same name or same name (%d)

I am also configuring NextCloud to be used as a centrally managed share folders/file system and am running into the same kinds of issues shared in this thread. It would be ideal if a file that is renamed, is then renamed for all other users it is shared with.

Was this addressed by chance in the nextcloud 12 release? Seems to me this is a show stopper for many users and organizations?

What are your takes here @karlitschek @schiessle @nickvergessen?

If I remember correctly we deliberately chose this path because lots of people mentioned they wanted to use their own ordering.

If however most other solutions do it in the way as described here, and our way results in confusion, we should adjust it. :)

For comparison, file/subdirectory synchronization in seafile and pydio work as we have described here. Also with Dropbox and office365. I used to use owncloud way back when and I don't recall this behavior so that is why I thought it was a bug in nextcloud?

@secure11 it was definitely that behavior all along.

So @nextcloud/sharing @karlitschek @LukasReschke @MorrisJobke since others are doing it differently, do we want to adjust to avoid confusion?

no strong opinions here. What do the others think?

We maybe should do some research on how others handle the corner case like: owner renames to a name that the recipient already uses for another folder, but beside that I'm open to adjust to the "rename for others" approach

I would only rename when the name is the "same" or "same (1)"

Our company utilizes Nextcloud as a central hub for our documents, and we have also found this current behavior of Nextcloud to be detrimental. We would greatly appreciate changing the sync protocol to what has been outlined here.

If the example @nickvergessen described earlier is still a concern, or if local naming/ordering is something that others want to preserve, perhaps a system combining both methods could be created. For example, having a local name and a shared name, I.E. local-name.txt (shared-name.txt).

Hi,
We also use the NC in our company. This bug is very difficult to work with.

I like the current approach. If somebody shares a folder images with me I should be free to rename that to whatever I want.

Also I would find it weird that if somebody shares a folder with me. It can change name without me knowing about it at any time. This can lead to weird things.

Also note that propagating renames of single shared files won't solve the issue. If that would be the case imagine

User a shares a file Foo to user b
User b uses the sync client
User b starts editing Foo
User a renames Foo to Bar
Now user B saves the file. And the program they use will most likely just write it to Foo
Bam. There are now two version of the file.

I do not share these folders

Also I would find it weird that if somebody shares a folder with me. It can change name without me knowing about it at any time. This can lead to weird things.

I agree. I think it is also quite confusing for the user if file names can change without knowing. Imagine you start working on a document called "foo.txt" today and tomorrow when you want to continue "foo.txt" is no longer there but therefore other files. Maybe if it is just one new file you might guess that this is the old "foo.txt" But if multiple new files appeared because other people shared some new files with your as well? How does the user is supposed to know where "foo.txt" is gone? I like the approach the the user controls the namespace of his files folder and nobody else.

if file names can change without knowing

That is the case already inside of shared folders. It should be clear that anything shared with edit permissions is basically out of complete control.

Also, let's not make so many assumptions about what is confusing. If Dropbox, Office365, Seafile and Pydio all work like this request, then it is us who have the unusual and confusing way to do it.

@rullzer

User a shares a file Foo to user b
User b uses the sync client
User b starts editing Foo
User a renames Foo to Bar
Now user B saves the file. And the program they use will most likely just write it to Foo
Bam. There are now two version of the file.

That is already the case inside of a folder nowerdays, so nothing new...

@jancborchardt

if file names can change without knowing

That is the case already inside of shared folders.

Wrong, that's kept track of in the activity app. However renaming the shared item does not work, because it is the mountpoint.

However [tracking] renaming the shared item does not work, because it is the mountpoint.

We _could_ make that work though, right? It's not that this detail should be a blocker for fixing this.

I agree that the current behavior is not welcome in a corporate environment. I understand that some people would prefer to have their own folder name, but in an environment where one has to locate a file or folder easily, it becomes confusing if each user has a different folder or file name ("have you looked into folder A?" "huh, I don't have any folder A"). If it's shared between multiple parties and each use a different name, that's even more of a headache! This is especially important in work environment, where you may start with a folder name created by default, but need to rename it later. Previously using dropbox, I was startled by nextcloud and owncloud behavior here.

May I suggest to add this as an option? Or to use as the default option, the "dropbox" method, while making optional the possibility to have different folder names across different users.

Sharing hundreds of thousands of files with dozens of people and having to actually work on these, this change would make a big difference.

May I suggest to add this as an option? Or to use as the default option, the "dropbox" method, while making optional the possibility to have different folder names across different users.

No, as an option would make it even more confusing. :) Then it might be different on people’s work and private installations, and it’s all a giant mess. Also we have to maintain both versions. See this article about preferences: http://ometer.com/preferences.html – that’s the reason why at Nextcloud we keep settings to the absolutely necessary minimum. :)

+1 for syncing file and folder names and renaming. Option at admin level to set the system-wide setting whether or not to sync folders and filenames would not be bad, as it would remove the ambiguity of how things are set on individual lvl.

Is this change on a roadmap yet, can we expect any updates soon?

Another +1. For what is to be a group account, I looked for a way to share the whole darn files section. Not finding a way to do that, i shared "Documents" and "Photos" figuring everything would fall into those categories. I was unpleasantly surprised that they showed up in everyone's Nextcloud folders as "Documents" and "Photos" rather than being within another folder representing the account they were shared with. So i renamed them "Group X Documents" and "Group X Photos", only to learn that these renames don't propagate.

And i've been using ownCloud and now Nextcloud for years personally and on some others' shared folders; i'm not entirely new to this and trying to share files in the group account use case has just been a series of unwanted discoveries.

We're using ownCloud at an organizational level and encountered this behavior. It was not expected and we thought it was a bug. I don't have a good suggestion for resolving this, knowing there could be issues with duplicate names.

+1 here. I know this was removed from the NC 13 roadmap, but it would helpful for us. Thanks!

+1 here. Shared structures on company level should be consistent. If someone (sales representative, colleague, etc...) wants to change such "readonly" share, the share should be copied to a new location. Edited and maybe shared back to other users. But the original structure shouldn't be touched in anyway, except the administator/manager of that share decides to rename the share. The actual behavior is a game stopper (+ a mess) in our company environment.

A big +1, anxiously awaiting this feature. Thanks for all your efforts for a great cloud product!

+1 on this feature request/fix. This simply does not work well for a corporate environment.

Thanks and keep up the excellent work!

+1 this feature should be implement as an option of a folder/file and it's very important in corporate environment.

We recently also stumbled about the renaming problem, where a "sharer" and the person who received the share had both renamed the share/shared object(file,directory) and in the end none of both were able to find the object they wanted to talk about. Such a situation is really confusing.

A possible workaround in my eyes would be if at least the one that received the share would be able to see the name and path the shared object has on the sharers side, i.e. the current name and path of this object on the sharers side. This would allow both persons to find the corresponding object names.

There are use cases for the existing behavior too, let's not forget.

When someone shares a folder with me, that folder gets dumped right into my root, top-level folder structure. This already creates a problem. I can't have 5 different folders called "Assets" and 5 different folders called "Images" and 5 different folders called "Clients" or whatever.
The sharer can use whatever folder structure and names make sense to them, but when they share to me, I just get the folders dumped into my root.
The operating system will already rename these "Clients (2)" which is ugly and meaningless. So I would rename it "Clients (Marketing)" or whatever. And my name makes sense for my folder structure and workflow, but wouldn't make sense for the original sharer to use this name.

Just because the sharer wants to rename something, doesn't mean that should be forced on me.
And further, as a nerd, I may attach other things to these folders, I may set up automations, scripts, tools, file watchers, etc on these folders. And if those folders can be magically renamed out from under me, it can cause trouble.

Lastly, people keep talking about Dropbox and other services, I believe these work exactly the same way. I always rename folders in DB shared with me, it works fine, the original sharer cannot change folder names on my system, at least not the ROOT folder name. If every client I work with shares an "assets" folder with me, Dropbox does not force me to keep using this original name, I can rename it whatever I want.

Unless I'm completely missing the point of this thread!

Interesting thread, I was having the same questions ...

I do not know the status of all this (remains unchanged or developement in process) and of course would like to know to inform some people, but I was wondering if NC should offer some settings to solve this issue, like an option to enforce a centralized naming (name of original folder is enforced) or decentralized naming (anybody can rename their own folders).

Another solution I was thinking about would be to have some kind of handle/slug for the naming that would be permanent during all the life of the file/folder, everybody being able to append to that handle a name of his/her choice. Of course that means we should have some tools to be able to search for that handle to help people find the file across different shares.

+1 for this. Current behaviour is very confusing.

+1 for this from me too - we can't tell people in the team which folder to find work in if the folder names are different for everyone.

Some of you are missing the problem here. What folder names are on MY machine cannot be dictated by other people.

If 3 departments all share a "Pictures" folder with me, the folders will already be named different; "Pictures (1)", "Pictures (2)", "Pictures (3)" let's say. I can't have three folders with identical names!

Now when marketing says "go in the pictures folder" I already have to translate this, "which pictures folder was theirs? Oh ya, that's (2)".

But it would be much better if I can rename it "Pictures (Marketing)". Now I can find their shared folder easier. Now when Susie from marketing says to go in the pictures folder, I know what that is on my end.

But people seem to be arguing that they need to maintain control of what folders are called on other peoples' computers. That is not something that can be demanded, simply because they may already have folders with the same name.

No matter how you want to argue this, the fact remains that in the situation where a folder already has the same name as the shared folder, the name will have "(1)" appended to it, it has to. This means the functionality to maintain different names across devices must remain. It HAS to be able to do this.

My recommendation is to simply create some way in which we can easily and quickly determine that this is a shared folder and that its original name on the source device is XYZ. Create some method to tell that our naming is different from source naming.

Valid point above. Personally what I would like to see is to retain the folder structure somehow. Now if let's say someone shares /Marketing/Pictures and /Sales/Pictures with me, what I get is /Pictures and /Pictures (2) or something similar. What I would like would be exactly the same but so that I only have access to those shared Pictures folders and not anything else that might be under /Marketing or /Sales. This way, keeping the path, identifying the locations would be easy. Might be hard to achieve though and there's probably reasons against this approach as well, but just my 2 cents.

@myllymik I don't know if you are aware that although you cannot rename shared folders, you can still move them around. In your use case you could create folders /Sales and /Marketing and once a new folder appears in "share_folder" move it to /Sales or /Marketing. It's not automatic, but works for me...

In my opinion sharing the folder structure would probably introduce new corner case / issues. For example User A shares /files-shared-by-me/projectA/pictures, but User B only wants /projectA/pictures

@schaarsc ah I didn't think about that possibility. Thanks for the tip.
I agree, corner cases and issues would arise. My point of view is the scenario where corporate admins have created the structure which should be kept for each user, so when I say file X is located in /Projects/ProjectA/Meeting minutes/X, everyone actually finds it in that path regardless of which parts of the path are shared for them.

we have the same issue using nextcloud. folder structure should be the same for all users. when you tell someone where a file is located the path should be the same for all in my opinion, even though i get the use cases above. i would say though, that these are the exception rather then the norm and the same absolute file paths for the users would be the norm. please let me know if you plan on changing that behaviour.

It's clearly a problem and really confusing. If you rename a folder in github and I get the latest version the name of the folder will be changed for me too. It's everything but friendly. I've just lost half a day with this and my client too. Nobody understood what was happening. If this is the case andd we end up here and we are not alone, sincerly, it's a bug. It should work like others.

We are considering using one user for everyone...

One solution/enhancement would be to introduce Labels that are displayed inline next to file and folder names.

This would allow users to modify folder names and structure however they wish, but the labels (which could be locked by admin), could be a quick and easy way to identify and refer to common folders and files across multiple accounts., like this:

image

This would also provide another functionality... for example, you could assign labels based on status, such as: Open, Processing, Closed, etc., to folders containing orders, project files, etc. which would easily communicate status changes.

Searching and sorting by labels would be nice too. :)

One solution/enhancement would be to introduce Labels that are displayed inline next to file and folder names.

This would allow users to modify folder names and structure however they wish, but the labels (which could be locked by admin), could be a quick and easy way to identify and refer to common folders and files across multiple accounts., like this:

image

This would also provide another functionality... for example, you could assign labels based on status, such as: Open, Processing, Closed, etc., to folders containing orders, project files, etc. which would easily communicate status changes.

Searching and sorting by labels would be nice too. :)

Great idea!

+1 on this... the labeling idea could be a good work around. At very least, an access level differentiation that would prevent a 'user' from changing a folder or file name created by an 'admin' (for either their own folders and files or that of the admin) but, would allow the admin to change folder and file names that would propagate to the user...

+1 for this. a file should only have one name. this is very confusing for our employees...

+1
I am using nextcloud to share pictures with the family members as read only (I am the sole controller of the files to prevent deletion/change etc). I create the folders and dump the related pictures in them, when I have time, I go back and rename the folders (for example adding the name of the event, like Jennies birthday etc.).
However existing behavior makes it impossible to push the changes to other users, they still see the folders as they were first created, and this is causing lots of problems.
Please at least give this as an option.
I would like to keep "every" file/folder that are shared same regardless of which user it is.
I believe if there is an existing name conflict, app should notify the user and allow them to change their local folder/files, since shared stuff should take priority (because it is used my many).

I started this thread long ago. Still really need this functionality. Your product is superior in so many other ways; however it is a showstopper for us without this functionality.

I read it too as an issue rather than a feature. I'm promoting FOSS to layperson users within my organization and this naming desync creates a lot of confusion and mistrust. I love NextCloud and would like to contribute further to its development to the best of my abilities; yet, this renaming issue is a hard blow for proper collaborative work.

Another note: can't tell whether it is related or not, but it seems I cannot delete a "main" folder for the others without having it re-appear on their own web interface...

Isn't there some sort of ownership's right attached to a folder you create? This could perhaps be a first lead to solve the issue.

It's not intuitive to ask each user to rename a folder or to get everyone on the same page for a folder name, especially if you are working in a big team with thousands of people. Could you please fix this?

I think that there are two cases here.

Scenario one: shared workspace for a team or entire organization
You want to share a folder with a team because it is to be a shared resource, a place where the team works in and with for an extended time. Say a Marketing folder, or the Engineering folder. You share because you are the manager or just put in charge of creating and distributing this resource. You might be an admin or sub-admin. As potentially many people have access to the shared resource, to keep everyone 'on the same page' it is easiest if the name stays under your control. You are essentially enforcing a way of working and organizing to facilitate smooth collaboration in a larger group.
This is clearly what @madhums is talking about at https://github.com/nextcloud/server/issues/2063#issuecomment-591409114

Scenario two: a one-off share
You uploaded a few docs you are working on with one or two colleagues. This is kind of a scratch space, something you work on for a week or maybe two. You share because you just happened to be the one who gathered or created the content, not because you have a special role, most certainly you're not an admin. As only a few people have access, it's best if the resource fits in everybody's own workflow. They can move the folder or, yes, even give it another name - if that's easier for them to remember what it was about. It is a temporary resource so your priority is to lower the barrier for the few ppl working on this and let them work how they prefer.
This was described by https://github.com/nextcloud/server/issues/2063#issuecomment-412939476

So, I think we actually have a 'perfect' solution for this and should close this issue. But first I want to point out that this isn't much of a private user issue - we cover scenario 2 (which is a typical SMB/private user case) just fine, with the default.

If you're a business and you had a subscription, as part of onboarding, you would have discussed how you work with us. And we'd have told you what the best way of dealing with such issues is: create a groupfolder. That does EXACTLY what you need, with a few added bonusses: people can't unshare it, you can set fine grained access control lists and more. If you work with 'thousands of people' like @madhums does then yes, this is your solution, don't just share a folder with everyone because that will get you in trouble.

Consider this free advice - and consider the loss in productivity your thousands of people experienced because you didn't simply discuss this with the right experts earlier on in the setup of your instance.

Hi @jospoortvliet,

Last time I checked, groupfolders do not work with encryption (server side). That's a blocker for some enterprises.

Since groupfolders can not be external storages atm, the argument of serverside encryption is invalid as per our explanation (warning box on https://docs.nextcloud.com/server/18/admin_manual/configuration_files/encryption_configuration.html )

Ok, another downside of groupfolders.
So we should have a better way to share files with external storage and encryption.
My use case needs scalability and big storage, so I aim to use external object storage via S3.

My client needs the rename to work as well. Each user does not want a name other than the original name given. Most of the people using it are non-techies, so having "labels" and names will likely confuse them. Please advise on your plan.

They are looking seriously into paid support. Because we will need it.

My suggestion would be an addon that forces rename across the board to all users. Or a configuration change (ofcourse) "force_rename_propagation = true".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blackcrack picture blackcrack  Â·  3Comments

juliushaertl picture juliushaertl  Â·  3Comments

ChristophWurst picture ChristophWurst  Â·  3Comments

MorrisJobke picture MorrisJobke  Â·  3Comments

dl5rcw picture dl5rcw  Â·  3Comments